OverviewScheduleResourcesAssignmentsHome

CSC 122: Computer Science II, Fall 2006

Project 1

Ramping up with Java - Reversi

Deadline: Friday, September 1, 5:00 p.m.

Overview:

This project deals with the game of Reversi, also known as Othello. It is played on an 8-by-8 checker board, with 64 pieces which are black on one side and white on the other. Initially, the four center squares are covered with pieces, turned to white on one diagonal and black on the other. The two players, black and white, then take turns placing one piece of their color at a time on an empty square of the board. Any pieces of the opposite color which form a contiguous line (horizontal, vertical, or diagonal) bounded at one end by the new piece and at the other by another piece of the same color are then flipped over to the player's color. Each turn must result in at least one of the opponent's pieces being flipped; if there is nowhere that a player can put a piece, their turn is skipped. The game ends when neither player can play; the winner is the one with the most pieces turned to their color.

Your task will be to implement two strategies for this game: a greedy approach which chooses the move that flips the most pieces, and a priority approach which searches the squares in a fixed priority order and chooses the first legal move.

Specification:
The Project and Getting Started:

Standards:

Your project should be well-written, neatly-formatted, modular, and well-documented. I suggest you use a test-driven approach to implementation: first create the classes and method stubs, next write appropriate tests for each method, and then fill in the bodies of the methods to make the tests succeed.

You may work in pairs or individually. Please review the policies on collaboration in the syllabus -- in particular, if you submit work developed as a pair, you need to make sure that you and your partner both understand all of the code submitted.

To submit your project, put all of the source files in an appropriately-named folder within I:\10607_CSC122\ and send me an email telling me where to find the files and, in the case of a pair, who your partner was.

Grading:

For extra credit, add functionality so that a human player can compete against one of the computer strategies. Also, I am planning to hold a tournament among all of the submissions, with 5 points of extra credit going to the winning strategy.

OverviewScheduleResourcesAssignmentsHome

Valid HTML 4.01!Valid CSS!DePauw University, Computer Science Department, Fall 2006
Maintained by Brian Howard (bhoward@depauw.edu). Last updated