Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

COthelloBoard Class Reference

COthelloBoard. More...

#include <OthelloBoard.h>

List of all members.

Public Member Functions

 COthelloBoard ()
 COthelloBoard.
 ~COthelloBoard ()
 ~COthelloBoard
void NewGame ()
 NewGame.
void PlayMove (const COthelloMove *m)
 PlayMove.
bool CheckMove (const COthelloMove *m) const
 CheckMove.
COthelloPiece::TYPE GetPieceType (uint32 x, uint32 y) const
 GetPieceType.

Protected Member Functions

int32 CheckDirection (const COthelloMove *m, int32 direction) const
 CheckDirection.


Detailed Description

COthelloBoard.

Description: Represents an Othello game board.

Limitations:


Constructor & Destructor Documentation

COthelloBoard::COthelloBoard  ) 
 

COthelloBoard.

Description: Class constructor

Limitations: NONE

COthelloBoard::~COthelloBoard  ) 
 

~COthelloBoard

Description: Class deconstructor

Limitations: NONE


Member Function Documentation

int32 COthelloBoard::CheckDirection const COthelloMove m,
int32  direction
const [protected]
 

CheckDirection.

Description: Checks a given direction for flipped pieces.

Parameters:
m is the move being checked.
direction is the direction to check.
Returns:
The number of pieces flipped in given direction.
Limitations: NONE

bool COthelloBoard::CheckMove const COthelloMove m  )  const
 

CheckMove.

Description: Checks a move and returns true if it is valid.

Parameters:
m is the move being checked.
Returns:
True if the move is valid and false otherwise.
Limitations: NONE

COthelloPiece::TYPE COthelloBoard::GetPieceType uint32  x,
uint32  y
const [inline]
 

GetPieceType.

Description: Returns the type of the piece at the given location.

Parameters:
x is the x-coordinate of the piece.
y is the y-coordinate of the piece.
Returns:
The type of the piece at the given coordinates
Limitations: The x and y values must be between 0 and 7 inclusive.

void COthelloBoard::NewGame  ) 
 

NewGame.

Description: Resets the board to the beginning state.

Returns:
void
Limitations: NONE

void COthelloBoard::PlayMove const COthelloMove m  ) 
 

PlayMove.

Description: Updates the board based on a given move.

Parameters:
m is the move to make.
Returns:
void
Limitations: The move must be valid.


The documentation for this class was generated from the following files:
Copyright (c) 2005 Matt Bruns, Pat Hammond, Kevin Markussen, Travis Service, Brain Shaver

SourceForge.net Logo