static Vector2 FindWoundedTarget(GameData.Board map) { return(map.AllCoords .Where(p => map[p].IsWounded) .SelectMany(p => map[p].LinesNearby) .First(p => !map[p].IsKnown)); }
static Vector2 FindMaxSliceSpaceTarget(GameData.Board map) { return(map.AllCoords .Where(p => !map[p].IsKnown) .OrderByDescending(p => map.GetLinesDistances(p).Sum()) .First()); }
private static void CheckShipOrientationPossibility(GameData data, GameData.Board map, Vector2 coords) { if (map.GetHorizontalDistances(coords).Sum() + 1 < data.MinShipSize) { map.MarkAsChecked(map[coords].HorizontalNearby); } if (map.GetVerticalDistances(coords).Sum() + 1 < data.MinShipSize) { map.MarkAsChecked(map[coords].VerticalNearby); } }