GameMap::ResourceTribute Class Reference

The tribute can not only be used to demand resources from enemies but also to transfer resources to allies. More...

#include <gamemap.h>

List of all members.

Public Member Functions

bool empty ()
void read (tnstream &stream)
void write (tnstream &stream)

Public Attributes

Resources avail [8][8]
Resources paid [8][8]
Resources payStatusLastTurn [8][8]
 for the messages that are send each turn it is necessary to record how much of the transfer happend during the last turn


Detailed Description

The tribute can not only be used to demand resources from enemies but also to transfer resources to allies.

tribute.avail[S][D].energy is the ammount of energy that player D may (still) extract from the net of player S tribute.paid[D][S].energy is the amount of energy that player D has already extracted from player S's net S is source player, D is destination player

Definition at line 327 of file gamemap.h.


Member Function Documentation

bool GameMap::ResourceTribute::empty (  ) 

Definition at line 1565 of file gamemap.cpp.

References avail, and paid.

Referenced by GameMap::write().

void GameMap::ResourceTribute::read ( tnstream stream  ) 

Definition at line 1581 of file gamemap.cpp.

References avail, paid, payStatusLastTurn, tnstream::readInt(), and Resources::resource().

Referenced by GameMap::read().

void GameMap::ResourceTribute::write ( tnstream stream  ) 

Definition at line 1611 of file gamemap.cpp.

References avail, paid, payStatusLastTurn, Resources::resource(), and tnstream::writeInt().

Referenced by GameMap::write().


Member Data Documentation

Resources GameMap::ResourceTribute::avail[8][8]

Definition at line 329 of file gamemap.h.

Referenced by PutTribute::checkbuilding(), GetResource::checkbuilding(), empty(), read(), Player::resetTribute(), PutTribute::start(), Player::swap(), transfer_all_outstanding_tribute(), and write().

Resources GameMap::ResourceTribute::paid[8][8]

Definition at line 330 of file gamemap.h.

Referenced by PutTribute::checkbuilding(), GetResource::checkbuilding(), empty(), ResourceTribute::getState(), read(), Player::resetTribute(), PutTribute::start(), Player::swap(), transfer_all_outstanding_tribute(), and write().

Resources GameMap::ResourceTribute::payStatusLastTurn[8][8]

for the messages that are send each turn it is necessary to record how much of the transfer happend during the last turn

Definition at line 333 of file gamemap.h.

Referenced by read(), Player::resetTribute(), Player::swap(), transfer_all_outstanding_tribute(), and write().


The documentation for this class was generated from the following files:
Generated on Mon May 21 01:46:46 2012 for Advanced Strategic Command by  doxygen 1.5.1