Type Definition hexgame::StoneMatrix

source · []
pub type StoneMatrix = Vec<Vec<Option<Color>>>;
Expand description

This type represents the board as a matrix of Option<Color>. It may be used to serialize/deserialize boards.

Each entry represents the stone placed on the respective cell, with None representing an empty cell.

The following board will be represented as vec![vec![None, Some(Color::Black)], vec![Some(Color::White), None]]:

 0  1
0\.  ●\0
 1\○  .\1
    0  1