Méthode | Description | |
---|---|---|
ConflictsWith ( |
Checks if another Ship occupies any cells that this Ship occupies.
|
|
Hit ( Coordinates coords ) : void |
Hits the ship at the coordinates.
|
|
IsAt ( Coordinates location ) : bool |
Indicates whether or not a location is an occupied cell.
|
|
IsHitAt ( Coordinates location ) : bool |
Checks whether the hit flag has been set at the specific ship location index.
|
|
IsSunk ( ) : bool |
|
|
Place ( Coordinates location, ShipOrientation orientation ) : void |
Places this Ship with the location and orientation. Sets the state of being placed to true.
|
|
Reset ( ) : void |
Resets the ship back to its initialized state.
|
|
Ship ( System.Entity parent, int length ) : System |
Sets the length of the Ship to length. The length must be at least 1.
|
|
Ship ( |
Copies an existing Ship.
|
|
Sink ( ) : void |
Sinks the ship
|
|
ToString ( ) : string |
Provides a string representation.
|
Méthode | Description | |
---|---|---|
GetAllLocations ( ) : IEnumerable |
public ConflictsWith ( |
||
otherShip | The |
|
Résultat | bool |
public IsAt ( Coordinates location ) : bool | ||
location | Coordinates | The |
Résultat | bool |
public IsHitAt ( Coordinates location ) : bool | ||
location | Coordinates | |
Résultat | bool |
public Place ( Coordinates location, ShipOrientation orientation ) : void | ||
location | Coordinates | The |
orientation | ShipOrientation | The |
Résultat | void |
public Ship ( System.Entity parent, int length ) : System | ||
parent | System.Entity | |
length | int | The number of cells the |
Résultat | System |