public static PlaceShipRequest GetLocationFromComputer() { PlaceShipRequest ShipToPlace = new PlaceShipRequest(); ShipToPlace.Direction = getDirection(GetRandom.GetDirection()); ShipToPlace.Coordinate = new Coordinate(GetRandom.GetLocation(), GetRandom.GetLocation()); return(ShipToPlace); }
public static ShipCoordinates GetLocationFromComputer() { ShipCoordinates ShipToPlace = new ShipCoordinates(); ShipToPlace.Direction = getDirection(GetRandom.GetDirection()); ShipToPlace.Coordinate = new Coordinates(GetRandom.GetLocation(), GetRandom.GetLocation()); return(ShipToPlace); }
public static Coordinate GetShotLocationFromComputer(Board victimboard, GameLevel gamelevel) { if (gamelevel == GameLevel.Hard) { if (GetRandom.r.Next(1, 100) <= 60) { return(GetRightLocationToShot(victimboard)); } } if (gamelevel == GameLevel.Medium) { if (GetRandom.r.Next(1, 100) <= 30) { return(GetRightLocationToShot(victimboard)); } } return(new Coordinate(GetRandom.GetLocation(), GetRandom.GetLocation())); }
public static Coordinate GetShotLocationFromComputer(Panel victimboard) { return(new Coordinate(GetRandom.GetLocation(), GetRandom.GetLocation())); }