CIS 1068 Assignment 4
A Game

Assigned: Friday, September 20
Due: Monday, October 7

points

a game

To pass the time during long winters, the ancient Nordic people would play the two-player game of Baggebo. In this assignment, you'll implement the game, but play will be against the computer.

During each round, players choose a move, which may be either Kloven, Oxberg, Vittsjo, Tvaro, or Revskar. The rules are:

The computer wins in the event of a tie.

Your program should behave as follows:

suggestions

An important skill in programming is learning how to break up a big job into smaller tasks.

Also remember to test things as you go. It's easier to find a mistake in 5 lines of code than it is to find a mistake in 500 lines of code.

style

testing (up to 5 extra credit points)

Remember that good code is readable and testable. In order to receive full credit for this assignment, you'll need to break up the problem into at least 5 methods separate from main( ). Develop and submit JUnit tests for at least one of these.

Recall that to create most of the skeleton of these tests for yourself, in Eclipse, under the package tab, right-click on your .java file (CTRL-click on a Mac), select New, then JUnit Test Case. Check off the functions for which you'd like some starter tests written, and then click Finish.

Some functions that we've used that should be helpful are:

what to submit

Please submit your .java file through Canvas. Do not submit your .class file.

It's a good idea to confirm through the Canvas submission page that what you've intended to submit was uploaded. We will grade what you submit. If you submit a corrupted, empty, or otherwise incorrect file, this is what we'll grade. It is your responsibility to verify through the Canvas submission page that you've submitted the correct files and that they were uploaded properly.

Here's a Canvas tutorial on how to submit files.