(board, boxes, coverage)
| 207 | |
| 208 | |
| 209 | def drawBoxCovers(board, boxes, coverage): |
| 210 | # Draws boxes being covered/revealed. "boxes" is a list |
| 211 | # of two-item lists, which have the x & y spot of the box. |
| 212 | for box in boxes: |
| 213 | left, top = leftTopCoordsOfBox(box[0], box[1]) |
| 214 | pygame.draw.rect(DISPLAYSURF, BGCOLOR, (left, top, BOXSIZE, BOXSIZE)) |
| 215 | shape, color = getShapeAndColor(board, box[0], box[1]) |
| 216 | drawIcon(shape, color, box[0], box[1]) |
| 217 | if coverage > 0: # only draw the cover if there is an coverage |
| 218 | pygame.draw.rect(DISPLAYSURF, BOXCOLOR, (left, top, coverage, BOXSIZE)) |
| 219 | pygame.display.update() |
| 220 | FPSCLOCK.tick(FPS) |
| 221 | |
| 222 | |
| 223 | def revealBoxesAnimation(board, boxesToReveal): |
no test coverage detected