예제 #1
0
 public bool ValidateDuplicateShotFired(Coordinates coordinates)
 {
     if (HitShots.Any(x => x.XCoordinate == coordinates.XCoordinate && x.YCoordinate == coordinates.YCoordinate) ||
         MissedShots.Any(x => x.XCoordinate == coordinates.XCoordinate && x.YCoordinate == coordinates.YCoordinate))
     {
         return(false);
     }
     return(true);
 }
예제 #2
0
 public bool AddHitShot(Coordinates coordinates)
 {
     HitShots.Add(coordinates);
     return(true);
 }