Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bananasmoothii committed Oct 8, 2023
1 parent 91ccef3 commit 59917b2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/game/connect4/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,13 @@ mod p4_tests {
println!();
let mut game_tree = GameNode::new_root(power4.clone(), p2, 0);
game_tree.explore_children(p2, 2, 0);
let wrong_chosen_node = game_tree
let wrong_play = NonZeroUsize::new(4).unwrap();
let wrong_chosen_node = &game_tree
.children()
.get(&NonZeroUsize::new(4).unwrap())
.unwrap();
.iter()
.find(|(play, _)| play == &wrong_play)
.unwrap()
.1;
assert_ne!(wrong_chosen_node.weight().unwrap(), 0);
}

Expand Down

0 comments on commit 59917b2

Please sign in to comment.