Module game

Module game 

Source

Structs§

Coord
Coord represents a coordinate on the board, e.g. a0, or k8 The column is a letter for the columns, and the row is expressed as a number
Game
The main state of the game.
Move
The struct representing a move, as a couple of Coords.

Enums§

Player
The enum for the player.

Functions§

play_move
The main entry point for the game engine: Take a game state and a move, and return another game state. The game state contains an error field in case something went wrong, but otherwise it is assumed that the returned game instance is the state of the game after the move was applied.