Add utility functions for readability and refactor make_move

This commit is contained in:
stefiosif
2024-08-28 21:07:22 +03:00
parent 6c8f445fa9
commit 21076da68c
10 changed files with 91 additions and 61 deletions

View File

@@ -1,7 +1,7 @@
use crate::board::fen::from_fen;
use String as FenError;
use super::board::Board;
use super::board::{Board, Color};
#[derive(Debug, PartialEq, Eq)]
pub struct Game {
@@ -22,6 +22,10 @@ impl Game {
pub const fn run(&self) {
Board::new();
}
pub const fn current_player(&self) -> Color {
self.board.state.current_player()
}
}
impl Default for Game {