private bool EndGame() { if (GameOver) { return(true); } if (FirstArmy.IsEmpty() || SecondArmy.IsEmpty()) { GameOver = true; StepInfo += "\n\n\t\t\t------ИГРА ОКОНЧЕНА------\n\n"; if (FirstArmy.IsEmpty()) { StepInfo += $"ПОБЕДИЛА вторая армия {SecondArmy.ArmyName}! \n"; } else { StepInfo += $"ПОБЕДИЛА первая армия {FirstArmy.ArmyName}! \n"; } return(true); } return(false); }
public bool IsGameFinished() { if (EndOfGame) { return(true); } if (FirstArmy.IsEmpty() || SecondArmy.IsEmpty()) { EndOfGame = true; MoveInfo += "\n\n\t******** Game over. "; if (FirstArmy.IsEmpty()) { MoveInfo += "The second army won. ********\n"; } else { MoveInfo += "The first army won. ********\n"; } return(true); } return(false); }