Practice with interfaces and implementing them.
EventBasedProgramming
project inside Eclipse. Use the SVN Repository Exploring
perspective to check out this project, then switch back to the Java
perspective. TODO
items in slides.BreakfastMain
. TODO
items in the new edu.roseHulman.csse220.charges
package. boardGames
contains an interface Game
for two-player board games with a graphical interface. An implementation of TicTacToe
based on this interface is provided, as is a GameRunner
component and a main class, GameMain
. You have four tasks, two of which are optional.
ActionListener
for the Quit button, according to the TODO
item in GameMain
. MouseListener
for the game runner according to another TODO
item in GameMain
. Your mouse listener should be fairly simple. Just get the location of a mouse click and call the appropriate GameRunner
method. Game
implementation for the Game of Nim. You should create a new class that implements Game
. Write code for all the required methods, studying TicTacToe
as an example. Change the value of the constant THE_GAME
in GameMain
to use your new class. This should be the only change you need to make to the existing code for your new game to work. Game
implementation for Dots and Boxes, following the recommendations from the previous item. Remember, in all your code:
Here is the grading rubric for this assignment.
Turn in your programming work by committing it to your SVN repository.