public SummaryBattleViewModel(Entities.Battle battle) { AttackerName = battle.War.Attacker.Entity.Name; DefenderName = battle.War.Defender.Entity.Name; AttackerImage = Images.GetCountryFlag(AttackerName).VM; DefenderImage = Images.GetCountryFlag(DefenderName).VM; WallHealth = (int)battle.WallHealth; RegionName = battle.Region.Name; BattleID = battle.ID; BattleStatus = battle.GetBattleStatus(); if (BattleStatus != BattleStatusEnum.OnGoing) { CanFight = false; } BattleStatusText = BattleStatus.ToHumanReadable(); var timeLeft = battle.GetTimeLeft(GameHelper.CurrentDay); if (timeLeft.TotalSeconds > 0) { TimeLeft = string.Format("{0:00}:{1:00}:{2:00}", Math.Floor(timeLeft.TotalHours), timeLeft.Minutes, timeLeft.Seconds); } else { CanFight = false; } if (battle.War.IsTrainingWar) { CanFight = true; AttackerImage = Images.Placeholder.VM; DefenderImage = AttackerImage; RegionName = "Edge of the Earth"; AttackerName = "Chuck Norris"; DefenderName = "Bruce Lee"; } }