/** * Give up the war * * @param Army $enemy The army to surrender to * * Note: Regardless of the $enemy, a surrender applies to all wars we are engaged in. */ private function demandSurrender($enemy) { if ($this->troops > $enemy->troops * $enemy->troops) { $enemy->parley(); $enemy->surrendered = true; } }