This commit is contained in:
2024-03-05 14:35:26 -08:00
parent b344ae359b
commit e8614dd29f
11 changed files with 70 additions and 69 deletions

View File

@@ -69,7 +69,7 @@ pub fn maximize_value(board: &Board) -> Option<Board> {
.filter(|x| !board.contains(*x))
.collect::<Vec<_>>();
let slots = free_slots_by_influence(&board)?;
let slots = free_slots_by_influence(board)?;
let all_symbols = {
// We need this many from the bottom, and this many from the top.
@@ -92,7 +92,7 @@ pub fn maximize_value(board: &Board) -> Option<Board> {
// equal-weight slots
.map(|s| {
(0..s)
.map(|_| a_iter.next().unwrap().clone())
.map(|_| *a_iter.next().unwrap())
.permutations(s)
.unique()
.collect_vec()