Свойство | Type | Description | |
---|---|---|---|
Position | Position |
Méthode | Description | |
---|---|---|
Adjacent ( Position p ) : bool |
Determines if a point is adjacent to a ship
|
|
Adjacent ( |
Returns true if a ship is adjacent to this ship
|
|
AdjacentPositions ( int width, int height ) : IEnumerable |
List of positions adjacent to a ship
|
|
At ( Position p ) : bool |
Determines if a ship occupies a position
|
|
AtOrAdjacent ( Position p ) : bool |
Creates a 1-space border around a ship and checks if a position is within this border
|
|
Clone ( ) : object | ||
Intersects ( |
Whether or not a ship intersects another ship
|
|
IntersectsOrAdjacent ( |
Whether or not a ship intersects or is next to another ship
|
|
Parse ( string s ) : |
||
Place ( int width, int height ) : void |
Randomly places a ship on a grid
|
|
ToString ( ) : string |
Describes a ship
|
public AdjacentPositions ( int width, int height ) : IEnumerable |
||
width | int | |
height | int | |
Résultat | IEnumerable |
public AtOrAdjacent ( Position p ) : bool | ||
p | Position | Position to check |
Résultat | bool |
public IntersectsOrAdjacent ( |
||
ship | ||
Résultat | bool |
public Place ( int width, int height ) : void | ||
width | int | width of grid |
height | int | height of grid |
Résultat | void |