#include <player.h>
Public Types | |
| typedef list< Vehicle * > | VehicleList |
| typedef list< Building * > | BuildingList |
| typedef list< Dissection > | DissectionContainer |
| the list of dissected units | |
| typedef list< PlayTime > | PlayTimeContainer |
| enum | PlayerStatus { human, computer, off, supervisor, suspended } |
| the status of the player More... | |
Public Member Functions | |
| Player () | |
| int | getPosition () const |
| const GameMap * | getParentMap () const |
| GameMap * | getParentMap () |
| void | setParentMap (GameMap *map, int pos) |
| void | swap (Player &secondPlayer) |
| swaps all information, units, buildings etc with the given player | |
| void | merge (Player &secondPlayer) |
| merges all units, buildings etc from secondplayer to this one | |
| bool | exist () const |
| does the player exist at all | |
| bool | isHuman () const |
| ASCString | getName () const |
| returns the name of the player | |
| void | setName (const ASCString &name) |
| DI_Color | getColor () const |
| PlayerColor | getPlayerColor () const |
| void | setColor (const DI_Color &color) |
| void | resetView () |
| void | resetResearch () |
| void | resetTribute () |
| void | resetPassword () |
Static Public Member Functions | |
| static int | getHumanPlayerNum (const GameMap *gamemap) |
Public Attributes | |
| bool | existanceAtBeginOfTurn |
| did the player exist when the turn started? Required for checking if a player has been terminated | |
| VehicleList | vehicleList |
| a list of all units | |
| BuildingList | buildingList |
| a list of all units | |
| Research | research |
| the status of the scientific research | |
| BaseAI * | ai |
| if the player is run by an AI, this is the pointer to it | |
| enum Player::PlayerStatus | stat |
| the status of the player | |
| Password | passwordcrc |
| the Password required for playing this player | |
| DissectionContainer | dissections |
| bool | __dissectionsToLoad |
| MessagePntrContainer | unreadmessage |
| the list of messages that haven't been read by the player yet | |
| bool | __loadunreadmessage |
| MessagePntrContainer | oldmessage |
| the list of messages that already have been read by the player yet | |
| bool | __loadoldmessage |
| MessagePntrContainer | sentmessage |
| the list of messages that have been sent yet | |
| bool | __loadsentmessage |
| int | queuedEvents |
| if ASC should check all events for fullfilled triggers, this variable will be set to true. This does not mean that there really ARE events that are ready to be executed | |
| int | ASCversion |
| the version of ASC that this player has used to make his last turn | |
| PlayTimeContainer | playTime |
| The time this player ended his turns. This is very informative in email games with > 2 players to find out who is delaying the game. | |
| MapCoordinate | cursorPos |
| DiplomaticStateVector | diplomacy |
| ASCString | |
Static Public Attributes | |
| static const char * | playerStatusNames [] |
Classes | |
| class | Dissection |
| struct | PlayTime |
Definition at line 100 of file player.h.
|
|
|
|
|
the list of dissected units
|
|
|
|
|
|
|
|
|
the status of the player
|
|
|
Definition at line 292 of file player.cpp. References ai, ASCversion, and queuedEvents. |
|
|
|
Definition at line 344 of file player.cpp. Referenced by AllianceSetupWidget::AllianceSetupWidget(), EmailSetupWidget::EmailSetupWidget(), getPlayerColor(), DashboardPanel::painter(), and PlayerSetupWidget::PlayerSetupWidget(). |
|
|
Definition at line 380 of file player.cpp. References GameMap::getPlayer(). Referenced by changePassword(), and newmessage(). |
|
|
|
|
|
|
|
Definition at line 363 of file player.cpp. References getColor(), and getPosition(). Referenced by VehicleTypeBaseWidget::display(), BuildingItem::display(), and BuildingTypeBaseWidget::display(). |
|
|
|
Definition at line 149 of file player.h. References human, stat, supervisor, and suspended. Referenced by authenticateUser(). |
|
|
merges all units, buildings etc from secondplayer to this one
Definition at line 545 of file player.cpp. |
|
|
Definition at line 579 of file player.cpp. References passwordcrc, and Password::reset(). |
|
|
Definition at line 562 of file player.cpp. References Research::clear(), and research. |
|
|
Definition at line 567 of file player.cpp. References getParentMap(). |
|
|
Definition at line 551 of file player.cpp. References getParentMap(), tfield::resourceview, tfield::setVisibility(), and visible_not. |
|
|
|
|
|
Definition at line 158 of file player.h. Referenced by PlayerSetupWidget::Apply(), and GameMap::read(). |
|
||||||||||||
|
Definition at line 302 of file player.cpp. References GameMap::sigPlayerTurnBegins, GameMap::sigPlayerTurnEnds, and GameMap::sigPlayerUserInteractionBegins. Referenced by GameMap::GameMap(). |
|
|
swaps all information, units, buildings etc with the given player
Definition at line 420 of file player.cpp. References ai, ASCversion, GameMap::ResourceTribute::avail, buildingList, color, cursorPos, diplomacy, dissections, email, existanceAtBeginOfTurn, GameMap::field, tfield::getVisibility(), tfield::mines, name, oldmessage, GameMap::ResourceTribute::paid, passwordcrc, GameMap::ResourceTribute::payStatusLastTurn, player, playTime, queuedEvents, research, tfield::resourceview, sentmessage, tfield::setVisibility(), stat, DiplomaticStateVector::swap(), swapData(), GameMap::tribute, unreadmessage, vehicleList, and GameMap::ysize. Referenced by tplayerchange::buttonpressed(). |
|
|
Definition at line 176 of file player.h. Referenced by GameMap::read(), and tspfldloaders::readdissections(). |
|
|
Definition at line 184 of file player.h. Referenced by GameMap::read(), and tspfldloaders::readmessages(). |
|
|
Definition at line 188 of file player.h. Referenced by GameMap::read(), and tspfldloaders::readmessages(). |
|
|
Definition at line 180 of file player.h. Referenced by GameMap::read(), and tspfldloaders::readmessages(). |
|
|
if the player is run by an AI, this is the pointer to it
Definition at line 144 of file player.h. Referenced by ASC_MainScreenWidget::eventKeyDown(), execuseraction(), Player(), GameMap::read(), tgameloaders::readAI(), swap(), tgameloaders::writeAI(), and GameMap::~GameMap(). |
|
|
the version of ASC that this player has used to make his last turn
Definition at line 194 of file player.h. Referenced by checkUsedASCVersions(), GameMap::endTurn(), Player(), GameMap::read(), showPlayerTime(), and swap(). |
|
|
|
Definition at line 205 of file player.h. Referenced by DashboardPanel::eval(), GameMap::getCursor(), GameMap::read(), swap(), and GameMap::write(). |
|
|
|
Definition at line 174 of file player.h. Referenced by tspfldloaders::readdissections(), swap(), and tspfldloaders::writedissections(). |
|
|
Definition at line 209 of file player.h. Referenced by EmailSetupWidget::Apply(), EditPlayerData::EditPlayerData(), EmailSetupWidget::EmailSetupWidget(), GameMap::read(), FileTransfer::send(), and swap(). |
|
|
did the player exist when the turn started? Required for checking if a player has been terminated
Definition at line 130 of file player.h. Referenced by authenticateUser(), checkforvictory(), GameMap::read(), and swap(). |
|
|
the list of messages that already have been read by the player yet
Definition at line 183 of file player.h. Referenced by tspfldloaders::readmessages(), swap(), viewunreadmessages(), and tspfldloaders::writemessages(). |
|
|
the Password required for playing this player
Definition at line 158 of file player.h. Referenced by authenticateUser(), GameMap::read(), resetPassword(), swap(), and GameMap::write(). |
|
|
Initial value: { "Human Player",
"AI player",
"off",
"Supervisor",
"suspended",
NULL }
Definition at line 284 of file player.cpp. |
|
|
The time this player ended his turns. This is very informative in email games with > 2 players to find out who is delaying the game.
Definition at line 203 of file player.h. Referenced by GameMap::endTurn(), GameMap::read(), showPlayerTime(), swap(), and GameMap::write(). |
|
|
if ASC should check all events for fullfilled triggers, this variable will be set to true. This does not mean that there really ARE events that are ready to be executed
Definition at line 191 of file player.h. Referenced by checkevents(), eventReady(), Player(), GameMap::read(), seteventtriggers(), GameMap::startGame(), and swap(). |
|
|
|
the list of messages that have been sent yet
Definition at line 187 of file player.h. Referenced by tspfldloaders::readmessages(), swap(), and tspfldloaders::writemessages(). |
|
|
|
the list of messages that haven't been read by the player yet
Definition at line 179 of file player.h. Referenced by ASC_MainScreenWidget::eventKeyDown(), Message::Message(), tspfldloaders::readmessages(), swap(), viewunreadmessages(), and tspfldloaders::writemessages(). |
|
1.4.2