-
Notifications
You must be signed in to change notification settings - Fork 193
Open
Description
In the StateMachine for EnterMineAndDigForNugget there is the following:
//if enough gold mined, go and put it in the bank
if (pMiner->PocketsFull())
{
pMiner->ChangeState(VisitBankAndDepositGold::Instance());
}if (pMiner->Thirsty())
{
pMiner->ChangeState(QuenchThirst::Instance());
}
Now I wonder, wouldn't it be better to return on after the lines where ChangeState
is called.
Cause now for example if the miners pockets are full it would go to the bank.
But if the miner is also thirsty, then the if statement for that block is still executed.
This will change the state to QuenchThirst from the bank location.
This could lead to really unexpected behaviour.
Metadata
Metadata
Assignees
Labels
No labels