File size: 335 Bytes
13bec41 |
1 2 3 4 5 6 7 8 |
def calc_holes_array(self, board, heights):
holes_list = []
for col_num in range(self.width):
col_value = 0
for row_num in range(self.height - 1, self.height - 1 - heights[col_num], -1):
col_value += 0 if board[row_num][col_num] == 1 else 1
holes_list.append(col_value)
return holes_list |