private Coordinates SearchingShot() { Random rand = new Random(); var hitNeighbors = Board.GetHitNeighbors(); var neighbor = rand.Next(0, hitNeighbors.Count - 1); return(hitNeighbors[neighbor].Coordinates); }
public Coordinates Shot() { var hitNeighbors = Board.GetHitNeighbors(); Coordinates coordinates; if (hitNeighbors.Any()) { coordinates = SearchingShot(); } else { coordinates = RandomShot(); } return(coordinates); }