I am writing a simple turn-based Android game which allows a player to play against the computer (i.e. phone in this case).
What would be a good/recommended way of letting the game update the computer's move against the player during the game? One way I could think of is to make the class maintaining the board visible to the computer player (pass the instance to the AI player instance) and update it directly, but this does not seem like a "good" approach. As sometimes it may take time to compute the next move. Also in future if we want to incorporate network play it should not involve a major rewrite to handle an update from the network player.
Any help with this is much appreciated.