private void SetComputerShips(Player p, RandomShipPlacementService rsps) { while (p.Ships.Count > rsps.OccupiedCoordinates.Count) { var theShip = p.Ships[rsps.OccupiedCoordinates.Count]; rsps.PlaceShipRandom(theShip); } }
private void PrepareComputerForGame(Player pc) { var rsps = new RandomShipPlacementService(pc.Grid.Height, pc.Grid.Width, new Random()); SetComputerShips(pc, rsps); }