diff --git a/src/bored/mod.rs b/src/bored/mod.rs index 445d7d0..ffe7ed0 100644 --- a/src/bored/mod.rs +++ b/src/bored/mod.rs @@ -5,7 +5,7 @@ use raylib::{ RaylibHandle, }; -use crate::gamedata::{algorithms::minimax_decision, Board, Disk}; +use crate::gamedata::{Board, Disk}; pub const STARTY: i32 = 9; pub const STARTX: i32 = 7; const WX: i32 = 14; diff --git a/src/gamedata/algorithms.rs b/src/gamedata/algorithms.rs index bcd9ccb..4e36837 100644 --- a/src/gamedata/algorithms.rs +++ b/src/gamedata/algorithms.rs @@ -1,5 +1,3 @@ -use std::time::{self, Instant}; - use super::{flip_disk, heuristic::get_score, Board, Disk}; pub fn minimax_decision(board: &Board, disk: Disk, depth: &i32) -> Board { let (child, _) = maximise(board, &disk, depth); diff --git a/src/gamedata/score_checkers.rs b/src/gamedata/score_checkers.rs index 115cb57..10b18db 100644 --- a/src/gamedata/score_checkers.rs +++ b/src/gamedata/score_checkers.rs @@ -110,7 +110,7 @@ pub fn get_legal_moves( } else if *row == max_row { moves.push(Direction::Down); } - if (*col > 0 && *col < max_col) { + if *col > 0 && *col < max_col { moves.push(Direction::Left); moves.push(Direction::Right); } else if *col == 0 {