CBG  0.1
Compendium of board games
Piece Class Reference

#include <Piece.h>

Inheritance diagram for Piece:
DestinationPiece IdentifierPiece SourcePiece SystemPiece SystemPiece SystemPiece

Public Member Functions

 Piece ()
 
 Piece (Player &owner)
 
virtual ~Piece ()
 
int getType () const
 Returns the type of piece. More...
 
bool setType (int type)
 Sets the type of piece. More...
 
virtual void print (ostream &os) const
 Inserts the piece into the given ostream. More...
 

Public Attributes

Playerowner
 Pointer to the pieces owner. More...
 

Protected Attributes

int type
 The type of the piece. More...
 

Constructor & Destructor Documentation

Piece::Piece ( )

Piece

Author
Ian Duffy
Darren Brogan
Piece::Piece ( Player owner)
Piece::~Piece ( )
virtual

Member Function Documentation

int Piece::getType ( ) const

Returns the type of piece.

void Piece::print ( ostream &  os) const
virtual

Inserts the piece into the given ostream.

Reimplemented in IdentifierPiece.

bool Piece::setType ( int  type)

Sets the type of piece.

Member Data Documentation

Player* Piece::owner

Pointer to the pieces owner.

int Piece::type
protected

The type of the piece.


The documentation for this class was generated from the following files: