This commit is contained in:
LinlyBoi
2023-05-10 16:23:20 +03:00
parent a36c89ad51
commit d01820cb63
3 changed files with 2 additions and 4 deletions

View File

@@ -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;

View File

@@ -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);

View File

@@ -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 {