#include <players.h>
Inheritance diagram for Detective:
Public Methods | |
Detective (void) | |
bool | IsSpy (void) |
int | NumTokens (TokenType t) |
Move | TakeTurn (void) |
Private Attributes | |
int | Tokens [NTokenTypes] |
|
Definition at line 37 of file players.c. References NTokenTypes, Tokens, and TokenType.
00038 { 00039 for (int i=0; i < NTokenTypes; i++) 00040 Tokens [i] = theRules.StartingTokens ((TokenType) i); 00041 } |
|
Reimplemented from Player. Definition at line 64 of file players.h. References False.
00064 { return False; } |
|
Reimplemented from Player. Definition at line 65 of file players.h. References Tokens, and TokenType. Referenced by ComputerDetective::CanLeave().
00065 { return (Tokens [t]); } |
|
Reimplemented from Player. Definition at line 43 of file players.c. References Bus, BusMask, Player::ChooseMove(), Move::Node, NullMove, Player::Pos, Subway, SubwayMask, Taxi, TaxiMask, Tokens, and Move::Trans.
00044 { 00045 UI.BeginTurn (*this); 00046 Move m = ChooseMove (); 00047 if (m != NullMove) 00048 { 00049 if (m.Trans & TaxiMask) // update tokens 00050 Tokens[Taxi]--; 00051 else if (m.Trans & BusMask) 00052 Tokens[Bus]--; 00053 else if (m.Trans & SubwayMask) 00054 Tokens[Subway]--; 00055 UI.EndTurn (*this, m); 00056 Pos = m.Node; 00057 } 00058 return m; 00059 } |
|
|