Back to Main Page
 

Programmer's Manual:

OOGA: Overview for classes

Table of Contents:
Summary

Classes:


GUI Classes:


Summary:
Every game is built on a PlayingBoard and contains GamePieces. The logic that contains the rules of the game is the GameModel. The GameModel manages the PlayingBoard and the GamePieces. In this way, it is very analogous to a tangible game. The rules mediate between the game's pieces and the playing board. The GUI (graphical interface) displays the board, pieces and model so that a player can interact with the game.
Because each game uses these classes, GamePieces and GameModel are both abstract so that each game can implement its own version. After all, each game has gamepieces and rules that are unique to that particular game.

Back To Top


Classes
The PlayingBoard
The client programmer constructs a playingboard by giving a height or width. The playing board can return its width and height.
It can also check whether a pair of coordinates, a row, or a column are valid.
The crux of this class is that the user can set a game piece at a coordinate specified by a column, row. The user can also get the GamePiece that occurs at a given row. This is the most important functionality of the PlayingBoard class.

Back To Top


The Matrix
The PlayingBoard is implemented with the matrix. The matrix class works out the logic so that elements can be accessed by column, row coordinates (in a Cartesian x,y format). The Matrix is built from an array, but has the logic internalized so that elements can be reached by an x,y coordinate. This is crucial to the implementation of the PlayingBoard.

Back To Top


The GamePiece
Each game contains its own game piece. Thus, this class is abstract. Each subclass then will have a toString function which will return a string version of the game piece. However, a graphical implementation of the gamepiece can also be implemented.

Back To Top


LastMoveStatusConstants
This is just a tiny class that contains the constants for a game's status. A game can be incomplete, in progress, finished, etc. This just allows us to use constants without having messy globals in our code.

Back To Top


Player
Constructs an identity for a player, in effect. Each player has a name and a score.

Back To Top


The PlayerList
The PlayerList allows a client programmer to register players. It also keeps track of turns and can return the current player playing.

Back To Top


LoopedList
This class allows for alternation of players placing gamepieces down.

Back To Top


FOR THE GUI

GameSuiteFrame
This is the graphical interface for our entire game suite. Each game is registered into the GameSuiteFrame, which implements a JFRAME. Furthermore, the generic menus for running different games are created in this class.

GameGUI
This class a graphical interface for each game and can then be called by the GameSuiteFrame. It implements the JInternalFrame interface.

BOARDGUI
This is the graphical interface for each game's playingboard.

Back To Top