Crate battleship_bot

Source

Modules§

place
All the place functions
shoot
All the shoot functions

Macros§

pos
A macro to create a position from x and y

Structs§

Battleship
Handles the games
Pos
Saves an x and y for a position on a board
Recording
Stores data about a game

Enums§

Boat
Stores the type of Boat that is on a cell
Player
Shot
Stores the data for a shot

Functions§

place_boat
Places a boat in boats
valid_shot
Check if pos is a valid position for a shot in shots

Type Aliases§

BoatMap
This is supposed to be returned by any place function.
ShotMap
This is supposed to be a parameter to any shoot function.