razorstorm / SingularityChess

2 stars 1 forks source link

Modify minimal amount of code to interface AI logic with Game class #24

Closed razorstorm closed 11 years ago

razorstorm commented 11 years ago

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.

derektli commented 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.

derektli commented 11 years ago

it should work now for both AI and Remote.