private static void ClearHotZoneByHuntingEachZombie(IHotZone hotZone) { List<IZombiePack> zombiePacks = _zombiePackRetriever.GetAllZombiePacksInHotZone(hotZone.Id); int packCount = 0; foreach(IZombiePack pack in zombiePacks) { MoveToZombiePack(pack); ClearPack(pack); packCount += 1; System.Console.WriteLine("Zombie pack " + packCount.ToString() + " destroyed."); var stats = _userStatsRetriever.GetStats(_user.Id); System.Console.Write("Level: " + stats.Level + ", "); System.Console.Write("Zombies Killed: " + stats.ZombiesKilled + ", "); System.Console.Write("Money: " + stats.MoneyAccumulated + ", "); System.Console.WriteLine("Zones: " + stats.HotZonesDestroyed); System.Console.WriteLine(); System.Console.WriteLine(); } }
private static bool IsUserOnHotZone(IHotZone hotZone) { var user = _userRetriever.GetUserById(_user.Id); return hotZone.Latitude == user.Latitude && hotZone.Longitude == user.Longitude; }
private static void MoveToHotZone(IHotZone hotZone) { while (!IsUserOnHotZone(hotZone)) { _userMover.MoveUser(_user.Id, hotZone.Latitude, hotZone.Longitude); _user = _userRetriever.GetUserById(_user.Id); ReplenishEnergy(); } }