프로퍼티 | 타입 | 설명 | |
---|---|---|---|
Position | Position |
메소드 | 설명 | |
---|---|---|
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 | |
리턴 | IEnumerable |
public AtOrAdjacent ( Position p ) : bool | ||
p | Position | Position to check |
리턴 | bool |
public Place ( int width, int height ) : void | ||
width | int | width of grid |
height | int | height of grid |
리턴 | void |