Due: Monday, March 24.
Use the new version of the game package $CS680/games6.
Choose two of the following three programming projects.
If you have questions about these questions - either what they mean or how to solve them - please ask them on the forum . And please answer each other. I need not be the only one to post replies.
A human player doesn't need to be charged computer time for thinking, so his thinking method should be nonexistent or some kind of no-op.
Feel free to look for clock and chess clock code wherever you like,
and borrow whatever you find - as long as you acknowledge the source,
and discuss the extent of your modifications. (Code you get from the
net is likely to have some bad smells and need refactoring.)
Jia develops several
versions of a digital clock applet. A google search with keywords
java chess clock
turned up a few potentially useful links (not as many as I thought I'd
find).
Real chess clocks count down from some preset time (perhaps 40 minutes to make 20 moves) rather than up from 0. You may write yours either way.
Design your application so that each clock runs in its own thread.
Optional: couple (a version of) your chess clock to the game package, so that some driver (either a new one or an existing one) shows the cumulative time used by each of the players during one play of a game. Hint: register the clock as a game observer.
Optional: combine your chess clock with a solution to the previous exercise so that it shows the total time each player spends thinking as well as the time she spends finding the best move. If you do this you have a good test of correctness: the sum of the times on each player's clocks should be the same, and should be the total elapsed time for the game.
We'll vote after Spring break and install the best Easy view in the package to publish.
Consider opening (or posting) to a forum thread in which you discuss what the abstract GUIView class needs. That way you can share ideas with your classmates.