(self, window)
| 19 | |
| 20 | # to design the board |
| 21 | def draw_cubes(self, window): |
| 22 | window.fill(green) |
| 23 | for row in range(rows): |
| 24 | for col in range(row % 2, cols, 2): |
| 25 | pg.draw.rect( |
| 26 | window, yellow, (row * sq_size, col * sq_size, sq_size, sq_size) |
| 27 | ) |
| 28 | |
| 29 | def move(self, piece, row, col): |
| 30 | self.board[piece.row][piece.col], self.board[row][col] = ( |