private Coordinates SearchingShot() { Random rand = new Random(Guid.NewGuid().GetHashCode()); var hitNeighbours = FiringBoard.GetHitNeighbours(); var neighbourIdx = rand.Next(hitNeighbours.Count); return(hitNeighbours[neighbourIdx]); }
public Coordinates FireShot() { var hitNeighbours = FiringBoard.GetHitNeighbours(); Coordinates coords; if (hitNeighbours.Any()) { coords = SearchingShot(); } else { coords = RandomShot(); } return(coords); }