MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / doTurn

Method doTurn

source/gamemap/GameMap.cpp:1075–1092  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1073}
1074
1075void GameMap::doTurn(double timeSinceLastTurn)
1076{
1077 OD_LOG_INF("Computing turn " + Helper::toString(mTurnNumber) + ", timeSinceLastTurn=" + Helper::toString(timeSinceLastTurn));
1078 unsigned int numCallsTo_path_atStart = mNumCallsTo_path;
1079
1080 uint32_t miscUpkeepTime = doMiscUpkeep(timeSinceLastTurn);
1081
1082 for (Seat* seat : mSeats)
1083 {
1084 if(seat->getPlayer() == nullptr)
1085 continue;
1086
1087 seat->getPlayer()->upkeepPlayer(timeSinceLastTurn);
1088 }
1089
1090 OD_LOG_INF("During this turn there were " + Helper::toString(mNumCallsTo_path - numCallsTo_path_atStart)
1091 + " calls to GameMap::path(), miscUpkeepTime=" + Helper::toString(miscUpkeepTime));
1092}
1093
1094void GameMap::doPlayerAITurn(double timeSinceLastTurn)
1095{

Callers 1

doPlayerAITurnMethod · 0.45

Calls 3

upkeepPlayerMethod · 0.80
toStringFunction · 0.50
getPlayerMethod · 0.45

Tested by

no test coverage detected