Create a new simple game setup.
This commit is contained in:
parent
04d6837b5e
commit
4e695f3a7e
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue