Johann made me clean up my code a bit (rust)

This commit is contained in:
Steph 2022-12-01 21:02:00 +01:00
parent e226804c46
commit 4fc0447e3e

View File

@ -59,13 +59,13 @@ fn main() {
.filter(|row|
row[0] == -1 && row[1] == -1 && row[2] == -1 && row[3] == -1 && row[4] == -1
)
.collect::<Vec<&Vec<i32>>>()
.collect::<Vec<_>>()
.len() > 0
||
(0..5)
.filter(|column|
board[0][*column] == -1 && board[1][*column] == -1 && board[2][*column] == -1 && board[3][*column] == -1 && board[4][*column] == -1
).collect::<Vec<usize>>()
).collect::<Vec<_>>()
.len() > 0
).collect();