Closed razorstorm closed 11 years ago
I dont think the polling techque is good. we need to think about the scenario for 2nd stage too. I think its good to handle it know. so that we can transition smoothly later. I will look into this tonite and try to come up with a solution.
it should work now for both AI and Remote.
Although I have written the game class to be as extensible as possible, there hasn't been much thought about how to connect the AI. You might need to make some changes to get the AI to connect with the game properly. Having the AI make api calls to the game should be very simple. Just call game.makeMove() and whatnot. But having the game know when to signal the AI to make a move might be harder. We can employ a polling technique and have the AI ask the game regularly if its turn, but it is probably easier to add the AI as an instance variable of the game class. In this way we might find it worthy to make Player classes that are extended by HumanPlayer and AIPlayer.