private static bool ShouldYell() { if (_yellsLeft > 0 && !GetMyEffects().Any()) { int countPlayersAroundMe = Gameboard.GetOtherExplorers().Where(x => Gameboard.MyExplorer.GetDistanceTo(x) <= 1).Count(); if (countPlayersAroundMe >= 1) { bool newPlayerFound = GetOtherExplorers().Where(x => Gameboard.MyExplorer.GetDistanceTo(x) <= 1 && !AlreadyYelledPlayerIDs.Contains(x.ID)).Any(); int countEnemiesAroundMe = Gameboard.GetActiveEnemies().Where(x => MyExplorer.GetDistanceTo(x) <= 3).Count(); if (countEnemiesAroundMe >= 1) { return(true); } } } return(false); }
private static void Wait() { if (_plansLeft > 0 && !GetMyEffects().Any() && MyExplorer.Sanity <= 200) { int countPlayersAroundMe = Gameboard.GetOtherExplorers().Where(x => Gameboard.MyExplorer.GetDistanceTo(x) <= 2).Count(); if (countPlayersAroundMe > 1) { CastPlan(); return; } } if (_lightsLeft > 0 && !GetMyEffects().Any()) { int countEnemiesAroundMe = Gameboard.GetActiveEnemies().Where(x => MyExplorer.GetDistanceTo(x) <= 5).Count(); if (countEnemiesAroundMe > 2) { CastLight(); return; } } Console.WriteLine(Actions.WAIT); }