Project Othello

From GPWiki

Files:GUITutorial_warn.gif The Game Programming Wiki has moved! Files:GUITutorial_warn.gif

The wiki is now hosted by GameDev.NET at wiki.gamedev.net. All gpwiki.org content has been moved to the new server.

However, the GPWiki forums are still active! Come say hello.

Overview

Othello (also known as Reversi) is a simple strategy game where 2 players use colored disks in an attempt to capture territory on an 8x8 board. Click here for the complete rules of Othello, and a playable online version of the game. A strategy guide for Othello may be found here.

To discuss Project Othello, please make use of this discussion thread on the forums.


Design

Here is a brief overview of the design of the game. All language implementations should attempt to adhere to this design in order to ensure commonality across all versions!

For those languages which are not object oriented (such as C), please attempt to segregate code into modules which correlate to the classes mentioned below.

Class: GameBoard

  • A public enumeration called PlayerSquare with possible values of None, Black and White.
  • An 8x8 array called squares representing the 64 squares on the Othello board.
  • An initialization routine called InitBoard
  • A function called CheckMove which accepts a PlayerSquare value and the coordinates of a location on the board. CheckMove returns TRUE if the square indicated represents a valid move for the player, and FALSE if the move is not valid.
  • A function called PlacePiece which accepts a PlayerSquare value and the coordinates of a location on the board, and alters the squares array to include this new move.
  • A function called CheckWin which accepts a PlayerSquare value and returns TRUE if the indicated player has achieved victory.

Class: Renderer

  • A public function called Draw which renders the board.

Class: SoundManager

  • An initialization routine called InitSoundManager
  • Routines LoadSound, PlaySound and UnloadSound.


Implementations

The following implementations of the project are planned. Please add your name if you are interested in assisting.

  • Visual Basic 6.0 with DirectX 7.0