private Coordinates SearchingShot() { Random rand = new Random(Guid.NewGuid().GetHashCode()); var hitNeighbors = ShotBoard.GetShotNeighbors(); var neighborID = rand.Next(hitNeighbors.Count); return(hitNeighbors[neighborID]); }
public Coordinates FireShot() { var ShotNeigbors = ShotBoard.GetShotNeighbors(); Coordinates coordinates; if (ShotNeigbors.Any()) { coordinates = SearchingShot(); } else { coordinates = RandomShot(); } return(coordinates); }