MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / endTurn

Method endTurn

game/state/battle/battle.cpp:2362–2376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2360}
2361
2362void Battle::endTurn(GameState &state)
2363{
2364 updateTBEnd(state);
2365
2366 // Pass turn to next org, if final org - increment turn counter and pass to first org
2367 auto it = ++std::find(participants.begin(), participants.end(), currentActiveOrganisation);
2368 if (it == participants.end())
2369 {
2370 currentTurn++;
2371 it = participants.begin();
2372 }
2373 currentActiveOrganisation = *it;
2374
2375 beginTurn(state);
2376}
2377
2378void Battle::giveInterruptChanceToUnits(GameState &state, StateRef<BattleUnit> giver,
2379 int reactionValue)

Callers 1

handleKeyDownMethod · 0.80

Calls 2

endMethod · 0.80
beginMethod · 0.45

Tested by

no test coverage detected