private static bool IsUserOnZombiePack(IZombiePack zombiePack) { var user = _userRetriever.GetUserById(_user.Id); return zombiePack.Latitude == user.Latitude && zombiePack.Longitude == user.Longitude; }
private static void ClearPack(IZombiePack pack) { int hunts = 1; while(_userZombiePackProgressRetriever.IsZombiePackDestroyed(_user.Id, pack.Id) == false) { _huntDirector.Hunt(_user.Id, pack.Id); _user = _userRetriever.GetUserById(_user.Id); ReplenishEnergy(); hunts += 1; } System.Console.WriteLine("Hunts to destroy: " + hunts); }
private static void MoveToZombiePack(IZombiePack pack) { while(!IsUserOnZombiePack(pack)) { _userMover.MoveUser(_user.Id, pack.Latitude, pack.Longitude); _user = _userRetriever.GetUserById(_user.Id); ReplenishEnergy(); } }