University of Calgary

reversi

Reversi

 Source: Tino Duong, 2003

Description:

(Note: Description taken from http://games.yahoo.com)

Reversi is a strategy board game. It appeared in England in the late 19th century, when Lewis Waterman and John Mollett separately claimed credit for inventing it.

Reversi is played on an uncheckered board of 64 squares arranged in an 8x8 array. The game begins with four discs already placed on the board, arranged as shown.
The object of Reversi is to flip the most disks to your color. If both players have the same number of discs of their color up, the game is a tie. A set of 64 identical pieces is shared by both players. Each piece is a checker-like disc that is white on one side and black on the other.

Players are designated Black and White. Beginning with Black, each player in turn places one disc onto a vacant square on the board. Black always places discs black side up, and White always places discs white side up. Once placed, a disc never moves, though it may be "flipped" so that it changes color.

A disc placement, usually called a "move," may only be made if it "captures" one or more of the opponent's discs. To make moves, players simply clicks on the square where they wish to place a disc. Yahoo! helps players determine which moves are legal by highlighting the squares where they can place a disc. A disc, or an unbroken line of discs of the same color, is captured when it becomes flanked on opposite ends by two opposing pieces, one of which must be the disc that was just placed on the board. Captures may be made along ranks (horizontal rows of squares), files (vertical rows of squares), or diagonals. Captured discs are flipped over to match the color of the capturing player's discs.

A player who cannot make a legal move loses his or her turn. The game continues until neither side can move; usually, this does not happen until the board is entirely filled. The player whose color is up on more of the discs at the end is the winner (you'll see the tally next to each player's name). If both players have the same number of discs of their color up, the game is a tie.

Your job is to write a program that allows a user to play reversi

Requirements:

Using the "easyCurses.java" program provided by Instructor Katrin Becker write a program that will allow two players to play Reversi

 

Your display may look similar to the below examples:





Additional Requirements:

NOTE: Adding color to the game board, will involve adding functionality to the easyCurses.java code and can be a little complicated -especially if you are trying to do so without a lot of screen flickering

Concepts:



Updated: August 9, 2005 08:18 PM