Advanced Strategic Command
Public Member Functions | Friends | List of all members
DiplomaticStateVector Class Reference

#include <player.h>

Inheritance diagram for DiplomaticStateVector:
Inheritance graph
[legend]

Public Member Functions

 DiplomaticStateVector (Player &_player)
 
DiplomaticStates getState (PlayerID towardsPlayer) const
 
void setState (PlayerID towardsPlayer, DiplomaticStates s)
 
bool isHostile (PlayerID towardsPlayer) const
 
bool sharesView (PlayerID receivingPlayer) const
 
bool isAllied (PlayerID towardsPlayer) const
 
void turnBegins ()
 
void swap (int secondPlayer)
 
bool getProposal (int fromPlayer, DiplomaticStates *state)
 
void read (tnstream &stream)
 
void write (tnstream &stream) const
 

Friends

class AllianceSetupWidget
 
class ChangeDiplomaticState
 
class DiplomacyCommand
 

Detailed Description

Definition at line 57 of file player.h.

Constructor & Destructor Documentation

DiplomaticStateVector::DiplomaticStateVector ( Player _player)

Definition at line 48 of file player.cpp.

Member Function Documentation

bool DiplomaticStateVector::getProposal ( int  fromPlayer,
DiplomaticStates state 
)
Returns
true if there are any proposals

Definition at line 127 of file player.cpp.

References Player::diplomacy, Player::getParentMap(), Player::getPosition(), and GameMap::player.

Referenced by testDiplomacy1(), and turnBegins().

DiplomaticStates DiplomaticStateVector::getState ( PlayerID  towardsPlayer) const
bool DiplomaticStateVector::isAllied ( PlayerID  towardsPlayer) const
inline
bool DiplomaticStateVector::isHostile ( PlayerID  towardsPlayer) const
inline
void DiplomaticStateVector::read ( tnstream stream)

Definition at line 145 of file player.cpp.

References tnstream::readInt().

Referenced by GameMap::read().

void DiplomaticStateVector::setState ( PlayerID  towardsPlayer,
DiplomaticStates  s 
)
bool DiplomaticStateVector::sharesView ( PlayerID  receivingPlayer) const
inline
void DiplomaticStateVector::swap ( int  secondPlayer)
void DiplomaticStateVector::turnBegins ( )
void DiplomaticStateVector::write ( tnstream stream) const

Definition at line 163 of file player.cpp.

References tnstream::writeInt().

Referenced by GameMap::write().

Friends And Related Function Documentation

friend class AllianceSetupWidget
friend

Definition at line 59 of file player.h.

friend class ChangeDiplomaticState
friend

Definition at line 60 of file player.h.

friend class DiplomacyCommand
friend

Definition at line 61 of file player.h.


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