Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

turncontrol.h File Reference

#include "ascstring.h"

Include dependency graph for turncontrol.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void next_turn (int playerView=-2)
void checkforvictory (bool hasTurnControl)
 checks if the current player has terminated another player or even won
bool continuenetworkgame (bool mostRecent=false)
 continues a PBeM game; the current map is deleted
bool continuenetworkgame (const ASCString &filename)
void checkUsedASCVersions (Player &currentPlayer)
 this checks if one player has been using a new ASC version than the current player. If this is the case, the current player is notified and asked to upgrade
int findNextPlayer (const GameMap *actmap)
void skipTurn (GameMap *gamemap)
 skips the next player. This is for administrative use, for example if a player does not react


Function Documentation

void checkforvictory bool  hasTurnControl  ) 
 

checks if the current player has terminated another player or even won

Definition at line 351 of file turncontrol.cpp.

References actmap, GameMap::actplayer, GameMap::Campaign::avail, GameMap::campaign, choice_dlg(), GameMap::continueplaying, displaymessage(), Player::exist(), Player::existanceAtBeginOfTurn, getmessage(), Player::getName(), GameMap::getPlayer(), GameMap::getPlayerView(), Player::human, next_turn(), GameMap::player, GameMap::replayinfo, and Player::stat.

Referenced by mainloopidle(), and AI::run().

void checkUsedASCVersions Player currentPlayer  ) 
 

this checks if one player has been using a new ASC version than the current player. If this is the case, the current player is notified and asked to upgrade

Definition at line 274 of file turncontrol.cpp.

References actmap, GameMap::actplayer, Player::ASCversion, Player::exist(), Player::getName(), getNumericVersion(), and GameMap::player.

Referenced by hookGuiToMap().

bool continuenetworkgame const ASCString filename  ) 
 

Definition at line 330 of file turncontrol.cpp.

References actmap, GameMap::actplayer, authenticateUser(), GameMap::beginTurn(), computeview(), FileTransfer::loadPBEMFile(), mapLoadingExceptionChecker(), and GameMap::setPlayerView().

bool continuenetworkgame bool  mostRecent = false  ) 
 

continues a PBeM game; the current map is deleted

Definition at line 295 of file turncontrol.cpp.

References continuenetworkgame(), tfindfile::FileInfo::date, tfindfile::getnextname(), tfindfile::FileInfo::name, selectFile(), and tournamentextension.

int findNextPlayer const GameMap actmap  ) 
 

Definition at line 117 of file turncontrol.cpp.

References GameMap::actplayer, Player::exist(), GameMap::getPlayerCount(), Player::off, GameMap::player, and Player::stat.

Referenced by iterateToNextPlayer(), next_turn(), and trunreplay::run().

void next_turn int  playerView = -2  ) 
 

Ends the turn of the current player and runs AI until a player is human again

Parameters:
playerView -2 = detect automatically; -1 = don't display anything; 0-7 = this player is watching

Definition at line 210 of file turncontrol.cpp.

References actmap, GameMap::actplayer, authenticateUser(), choice_dlg(), GameMap::endTurn(), findNextPlayer(), Player::human, iterateToNextPlayer(), GameMap::player, GameMap::time, GameTime::turn(), and viewtext2().

Referenced by checkforvictory(), GuiFunctions::EndTurn::execute(), gamethread(), and StartMultiplayerGame::start().

void skipTurn GameMap gamemap  ) 
 

skips the next player. This is for administrative use, for example if a player does not react

Definition at line 265 of file turncontrol.cpp.

References GameMap::actplayer, GameMap::beginTurn(), GameMap::endTurn(), and iterateToNextPlayer().

Referenced by networksupervisor().


Generated on Tue Jun 24 02:12:33 2008 for Advanced Strategic Command by  doxygen 1.4.2