add comments

This commit is contained in:
2025-01-28 16:20:01 -05:00
parent 652ea97f83
commit db627f087f
2 changed files with 2 additions and 25 deletions

View File

@@ -17,9 +17,9 @@ impl Agent for ComplexAgent {
.collect::<Vec<(usize, usize)>>()
})
.map(|(i, j)| (i, j, board.move_would_propegate(i, j, self.color)))
.filter(|&(_, _, c)| c >= 0)
.filter(|&(_, _, c)| c >= 0) // a `c` value of less than 0 implies the move is invalid: TODO! make this an enum or smth
.max_by_key(|&(_, _, c)| c)
.map(|(i, j, _)| (i, j))
.map(|(i, j, _)| (i, j)) // remove `c` and return the best move
}
fn name(&self) -> &'static str {