Simple tictactoe game based on minimax function