(text, font, text_col, button_col, x, y, width, height)
| 120 | |
| 121 | |
| 122 | def draw_button(text, font, text_col, button_col, x, y, width, height): |
| 123 | pygame.draw.rect(screen, button_col, (x, y, width, height)) |
| 124 | pygame.draw.rect(screen, WHITE, (x, y, width, height), 2) |
| 125 | text_img = font.render(text, True, text_col) |
| 126 | text_rect = text_img.get_rect(center=(x + width // 2, y + height // 2)) |
| 127 | screen.blit(text_img, text_rect) |
| 128 | return pygame.Rect(x, y, width, height) |
| 129 | |
| 130 | |
| 131 | def victory_screen(winner_img): |
no test coverage detected