YES
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user