Minimax Algorithm for tictactoe just plays in the next available square
I’m trying to learn the minimax algorithm. my minimax algorithm just doesn’t work, The computer just plays “O” in the next available square. My entire source code is below (sorry for the wall of text). The bestScore variable stays at what it was initially set as (1000 or -1000 depending on if it was maximising or minimising) and it never returns one of the base cases. Not sure where to go from here