mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
Fixes according to review
This commit is contained in:
parent
97ba7df152
commit
940bdcee3e
@ -27,7 +27,7 @@ public:
|
||||
virtual void visitPlayerBlocked(PlayerBlocked & pack) {}
|
||||
virtual void visitPlayerCheated(PlayerCheated & pack) {}
|
||||
virtual void visitYourTurn(YourTurn & pack) {}
|
||||
virtual void visitYourTurn(DaysWithoutTown & pack) {}
|
||||
virtual void visitDaysWithoutTown(DaysWithoutTown & pack) {}
|
||||
virtual void visitTurnTimeUpdate(TurnTimeUpdate & pack) {}
|
||||
virtual void visitEntitiesChanged(EntitiesChanged & pack) {}
|
||||
virtual void visitSetResources(SetResources & pack) {}
|
||||
|
@ -110,7 +110,7 @@ void YourTurn::visitTyped(ICPackVisitor & visitor)
|
||||
|
||||
void DaysWithoutTown::visitTyped(ICPackVisitor & visitor)
|
||||
{
|
||||
visitor.visitYourTurn(*this);
|
||||
visitor.visitDaysWithoutTown(*this);
|
||||
}
|
||||
|
||||
void EntitiesChanged::visitTyped(ICPackVisitor & visitor)
|
||||
|
@ -108,7 +108,7 @@ void TurnOrderProcessor::doStartPlayerTurn(PlayerColor which)
|
||||
|
||||
void TurnOrderProcessor::doEndPlayerTurn(PlayerColor which)
|
||||
{
|
||||
assert(playerMakingTurn(which));
|
||||
assert(isPlayerMakingTurn(which));
|
||||
assert(gameHandler->getPlayerStatus(which) == EPlayerStatus::INGAME);
|
||||
|
||||
actingPlayers.erase(which);
|
||||
@ -149,7 +149,7 @@ void TurnOrderProcessor::onPlayerEndsGame(PlayerColor which)
|
||||
|
||||
bool TurnOrderProcessor::onPlayerEndsTurn(PlayerColor which)
|
||||
{
|
||||
if (!playerMakingTurn(which))
|
||||
if (!isPlayerMakingTurn(which))
|
||||
{
|
||||
gameHandler->complain("Can not end turn for player that is not acting!");
|
||||
return false;
|
||||
@ -197,17 +197,17 @@ void TurnOrderProcessor::tryStartTurnsForPlayers()
|
||||
}
|
||||
}
|
||||
|
||||
bool TurnOrderProcessor::playerAwaitsTurn(PlayerColor which) const
|
||||
bool TurnOrderProcessor::isPlayerAwaitsTurn(PlayerColor which) const
|
||||
{
|
||||
return vstd::contains(awaitingPlayers, which);
|
||||
}
|
||||
|
||||
bool TurnOrderProcessor::playerMakingTurn(PlayerColor which) const
|
||||
bool TurnOrderProcessor::isPlayerMakingTurn(PlayerColor which) const
|
||||
{
|
||||
return vstd::contains(actingPlayers, which);
|
||||
}
|
||||
|
||||
bool TurnOrderProcessor::playerAwaitsNewDay(PlayerColor which) const
|
||||
bool TurnOrderProcessor::isPlayerAwaitsNewDay(PlayerColor which) const
|
||||
{
|
||||
return vstd::contains(actedPlayers, which);
|
||||
}
|
||||
|
@ -37,9 +37,9 @@ class TurnOrderProcessor : boost::noncopyable
|
||||
void doStartPlayerTurn(PlayerColor which);
|
||||
void doEndPlayerTurn(PlayerColor which);
|
||||
|
||||
bool playerAwaitsTurn(PlayerColor which) const;
|
||||
bool playerMakingTurn(PlayerColor which) const;
|
||||
bool playerAwaitsNewDay(PlayerColor which) const;
|
||||
bool isPlayerAwaitsTurn(PlayerColor which) const;
|
||||
bool isPlayerMakingTurn(PlayerColor which) const;
|
||||
bool isPlayerAwaitsNewDay(PlayerColor which) const;
|
||||
|
||||
public:
|
||||
TurnOrderProcessor(CGameHandler * owner);
|
||||
|
Loading…
Reference in New Issue
Block a user