Main Page | Class Hierarchy | Class List | File List | Class Members

CBoard::Spot Class Reference

Represents a spot on a CBoard. More...

#include <cboard.h>

List of all members.

Public Member Functions

 Spot ()
 Constructor.
void set (int xval, int yval)
 set the spot
int getX () const
 Get X value.
int getY () const
 Get Y value.
bool isAllotted () const
 Check to see if spot has been set.


Detailed Description

Represents a spot on a CBoard.

This class represents a positon on a board. It is mostly used (and would probably only be useful) by the Cboard class methods to calculate a move. It provides easy read/write methods. Its primary use it to store (x, y) coordinates on the board, as well as the isAlloted() method to determine if the spot has been set or not.


Member Function Documentation

int CBoard::Spot::getX  )  const [inline]
 

Get X value.

Returns:
The value of x

int CBoard::Spot::getY  )  const [inline]
 

Get Y value.

Returns:
The value of y

bool CBoard::Spot::isAllotted  )  const [inline]
 

Check to see if spot has been set.

Returns:
true if members have been set, false otherwise

void CBoard::Spot::set int  xval,
int  yval
 

set the spot

This method allows a client to set the x and y coordinated on the board.

Parameters:
xval The value of x
yval the value of y


The documentation for this class was generated from the following files:
Generated on Thu Jan 19 19:15:21 2006 for TicTacToe by  doxygen 1.4.4