Johann made me clean up my code a bit (rust)
This commit is contained in:
parent
4fc0447e3e
commit
d2346af0da
@ -59,14 +59,12 @@ fn main() {
|
||||
.filter(|row|
|
||||
row[0] == -1 && row[1] == -1 && row[2] == -1 && row[3] == -1 && row[4] == -1
|
||||
)
|
||||
.collect::<Vec<_>>()
|
||||
.len() > 0
|
||||
.count() > 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<_>>()
|
||||
.len() > 0
|
||||
).count() > 0
|
||||
).collect();
|
||||
|
||||
if last_winning_boards.len() == 0 && winning_boards.len() == 1 {
|
||||
|
Loading…
Reference in New Issue
Block a user