Add utility functions for readability and refactor make_move
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user