In this project you will write the back-end of a system to support turn-based AI tournaments. You are provided with the complete documentation for the system, and the implementation of several classes:
You will have to write the following:
makeMoveshould determine if the move was made within the window of opportunity, and immediately return, so the Player object regains control of the thread quickly.
moveAvailableshould also return right away. Use an
interrupt()call to wake up a Thread who's sole responsibility is to call
moveAvailableon the Player object. That thread should just be looping in the
runmethod of GameProxy, alternately waiting to be interrupted and calling
moveAvailableon the Player. If the player causes an exception on that thread, you can just let that thread crash; the game should continue on regardless.
nullfor the move). Once the player object returns from
moveAvailable, the most recent move is made available by GameProxy calling
moveAvailableon the Player object again. For example, if a player took too long thinking and missed a few turns, only the most recent turn is made available with a call to the player's
Due November 12, at the start of class.