[−][src]Module spacebattleship::board
Types that make up the game board.
Re-exports
pub use self::setup::BoardSetup; |
Modules
common | Common types that are useful to various types of boards. |
rectangular | Implements a basic rectangular board. |
setup | Implements the setup phase of the board. |
Structs
AddShipError | Error returned when trying to add a ship that already existed. |
Board | Represents a single player's board, including their ships and their side of the ocean. |
CellRef | Reference to a particular cell in the grid. |
NeighborIter | Iterator over the neighbors of a coordinate. |
PlaceError | Error caused when attempting to place a ship in an invalid position. |
ShipRef | Handle to a ship that allows getting information about its status. |
ShotError | Error returned when trying to shoot a cell. |
Enums
CannotPlaceReason | Reason why a ship could not be placed with a given projection. |
CannotShootReason | Reason why a particular tile could not be shot. |
ShotOutcome | Result of a shot on a single player's board. |
Traits
ColinearCheck | Trait for |
Coordinate | Trait for coordinates used in |
Dimensions | Dimensions of a board. Implements methods needed for the board to check bounds, linearize indexes, and compute neighbor cells. |
NeighborIterState | State type for the neighbor iterator. |