Create a new simple game setup.

This commit is contained in:
Dorian 2019-03-02 16:49:09 -05:00
parent 04d6837b5e
commit 4e695f3a7e
1 changed files with 10 additions and 6 deletions

View File

@ -120,17 +120,21 @@ pub enum GameState {
DrawGame,
}
pub struct Player {
name: String,
}
pub struct Game {
board: Board,
light_player: Player,
dark_player: Player,
state: GameState,
}
impl Game {
pub fn new(size: BoardSize) -> Game {
// TODO: Add the concept of rulesets for the various checkers variants.
Game {
board: Board::new(size),
state: GameState::LightPlayerTurn,
}
}
}
#[cfg(test)]
mod tests {