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

Player Class Reference

A class representing a player on a tic-tac-toe board. More...

#include <player.h>

List of all members.

Public Member Functions

 Player (char ic, char oic) throw (std::invalid_argument)
 Constructor.
char getIcon () const
 Get the player icon.
char getOtherIcon () const
 Get the opponant's icon.


Detailed Description

A class representing a player on a tic-tac-toe board.

The Player class represents a player. It was primarily designed to be used with the Board and CBoard class. The class will store information about you and your opponants icons, as well as providing easy read access

Author:
Jesse H-K
Date:
Jan 18, 2006


Constructor & Destructor Documentation

Player::Player char  ic,
char  oic
throw (std::invalid_argument) [explicit]
 

Constructor.

See also:
Player
Parameters:
ic The icon to be assigned to the player
oic The icon the be assigned to your opponant. Should be opposite ic
Exceptions:
std::invalid_argument Thrown when ic, or oic do not equal 'x' or 'o'


Member Function Documentation

char Player::getIcon  )  const [inline]
 

Get the player icon.

Returns:
The icon assigned to player
See also:
getOtherIcon()

char Player::getOtherIcon  )  const [inline]
 

Get the opponant's icon.

Returns:
The icon assigned to your opponant
See also:
getIcon()


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