From a2f302b4b040ed1d7db14d1800f2a4eb3e131d9a Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Sat, 22 Feb 2025 12:34:30 -0500 Subject: [PATCH] use Move::new in FutureMoves::create_root_raw --- src/logic/future_moves.rs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/logic/future_moves.rs b/src/logic/future_moves.rs index 7f203f3..338eb8a 100644 --- a/src/logic/future_moves.rs +++ b/src/logic/future_moves.rs @@ -248,18 +248,15 @@ impl FutureMoves { pub fn create_root_raw(&mut self, board: Board) { self.arena.clear(); - self.arena.push(Move { - i: 0, - j: 0, + self.arena.push(Move::new( + 0, + 0, board, - winner: board.game_winner(), - parent: None, - children: Vec::new(), - value: 0, - color: !self.agent_color, - lazy_children: false, - self_value: 0, - }); + !self.agent_color, + false, + self.agent_color, + None, + )); } /// Update the root based on the coordinate of the move