Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Spy Class Reference

#include <players.h>

Inheritance diagram for Spy:

Player ComputerSpy HumanSpy List of all members.

Public Methods

bool IsSpy (void)
int NumTokens (TokenType)
Move TakeTurn (void)
MoveListGetHistory (void)

Member Function Documentation

MoveList& Spy::GetHistory void    [inline]
 

Reimplemented from Player.

Definition at line 80 of file players.h.

References Player::History.

00080 { return History; }

bool Spy::IsSpy void    [virtual]
 

Reimplemented from Player.

Definition at line 21 of file players.c.

References True.

00021 { return True; }

int Spy::NumTokens TokenType    [inline, virtual]
 

Reimplemented from Player.

Definition at line 78 of file players.h.

References Invalid, and TokenType.

00078 { return Invalid; }

Move Spy::TakeTurn void    [virtual]
 

Reimplemented from Player.

Definition at line 61 of file players.c.

References MoveList::Append(), Player::ChooseMove(), Player::History, NullMove, and Player::Pos.

00062   {
00063    Move squamosal; // Squamosal = "crest" of a ceratopsian dinosaur
00064    Move Rostrum;   // Rostrum = bony "beak" of a ceratopsian dinosaur
00065 
00066    UI.BeginTurn (*this);
00067    squamosal = ChooseMove ();
00068    if (squamosal != NullMove)
00069      {
00070       Move* theMove = new Move;
00071       *theMove = squamosal;
00072       History.Append (theMove);
00073       Pos = theMove -> Node;               // update Pos
00074       if (theRules.ShowSpy ())
00075   UI.RevealSpy (*this, squamosal);
00076       else
00077   UI.SpyTurn (squamosal, theRules.CurrentTurn());
00078      }
00079    return squamosal;
00080   }


The documentation for this class was generated from the following files:
Generated on Sun Jul 6 23:07:18 2003 for Scotland Yard by doxygen1.2.15