Closed laila-chammaa closed 2 years ago
Okk This adds validation to every strategies that calls getAttackableTerritories right? So the Normal and the Human strategies?
no this is just human cuz it asks for more than one, normal always asks for one army at a time, and then on the next turn, it checks if reinforcment input is > 0 before asking for another army, so validation is already there:
if (issuingPlayer->getReinforcementPool() > 0)
{
..........
// Create Deploy -> decrease reinforcement
Deploy *deploy = new Deploy(1, issuingPlayer, territoryTarget);
issuingPlayer->setReinforcementPool(issuingPlayer->getReinforcementPool() - 1);
Okk This adds validation to every strategies that calls getAttackableTerritories right? So the Normal and the Human strategies?
no this is just human cuz it asks for more than one, normal always asks for one army at a time, and then on the next turn, it checks if reinforcment input is > 0 before asking for another army, so validation is already there:
if (issuingPlayer->getReinforcementPool() > 0) { .......... // Create Deploy -> decrease reinforcement Deploy *deploy = new Deploy(1, issuingPlayer, territoryTarget); issuingPlayer->setReinforcementPool(issuingPlayer->getReinforcementPool() - 1);
Ok gotchu I'm approving it and merging it into a3_archived
validating if the amount entered is available.