MiniMax always returning next empty cell
After loosing the tree in the forest here I'am asking for directions.
Trust me I have lost lot of my hair (had my hair cut) before decided to post this and know I am being silly here.
My MiniMax code is always giving the next available cell.
val engine = TTTEngine()
engine.findBestMoveForO()
Expected Output: CellPosition.TopEnd
Actual Output: CellPosition.TopCenter (First Available Cell)
The Code
class TTTEngine {
private var state = mutableMapOf()
private var botPlayer: Player =...