Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4 from knewjade/master
Browse files Browse the repository at this point in the history
Fix bug that filledness is always 2
  • Loading branch information
MinusKelvin authored Mar 13, 2020
2 parents cf10329 + 774debb commit f2b69c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bot/src/evaluation/standard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,11 +445,11 @@ fn covered_cells(board: &Board) -> (i32, i32) {
fn sky_tslot(board: &Board) -> Option<(i32, i32)> {
fn filledness(board: &Board, x: i32, y: i32) -> usize {
let mut filled = 0;
for cy in y-1..y+1 {
'yloop: for cy in y-1..y+1 {
for rx in 0..10 {
if rx < x-1 || rx > x+1 {
if !board.occupied(rx, cy) {
break
continue 'yloop;
}
}
}
Expand Down

0 comments on commit f2b69c7

Please sign in to comment.