Documentation ¶
Index ¶
Constants ¶
View Source
const (
// CollectionBoard is name of collection that stores boards
CollectionBoard = "boards"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Board ¶
type Board struct { ID string `json:"board_id" bson:"board_id"` Width int `json:"width" bson:"width"` Height int `json:"height" bson:"height"` Ships [][]bool `json:"ships" bson:"ships"` Torpedoes [][]bool `json:"torpedoes" bson:"torpedoes"` }
Board model
type BoardInput ¶
type BoardInput struct { Width int `json:"width" bson:"width"` Height int `json:"height" bson:"height"` }
BoardInput model
type BoardStatus ¶
type BoardStatus struct { TurnsPlayed int `json:"turnsPlayed" bson:"turnsPlayed"` ShipsHit int `json:"shipsHit" bson:"shipsHit"` ShipsLeft int `json:"shipsLeft" bson:"shipsLeft"` }
BoardStatus model
Click to show internal directories.
Click to hide internal directories.