|
2 | 2 | import sys |
3 | 3 | import time |
4 | 4 | import shared |
| 5 | +pygame.init() |
| 6 | +screen = pygame.display.set_mode([600, 500]) |
5 | 7 | pygame.display.set_caption(f"Result") |
6 | 8 | print(f"Received Data -> Home: {shared.home_team}, Away: {shared.away_team}, Location: {shared.match_location}") # Testing reciept of score |
7 | 9 |
|
8 | | - |
9 | | -pygame.init() |
10 | | - |
11 | | -screen = pygame.display.set_mode([600, 500]) |
12 | 10 | white = (255, 255, 255) |
13 | 11 | black = (0, 0, 0) |
14 | 12 | green = (0, 255, 0) |
@@ -38,11 +36,11 @@ def draw_text(text, font, color, surface, x, y): |
38 | 36 |
|
39 | 37 | # Constantly monotoring the scores to see if there is a winner |
40 | 38 | if first_innings_score > second_innings_score: |
41 | | - draw_text(f"{shared.first_batting_team} Wins! ({first_innings_score} Runs vs {second_innings_score} Runs)", font, green, screen, 50, 50) |
| 39 | + draw_text(f" {shared.first_batting_team} Wins! ({first_innings_score} Runs vs {second_innings_score} Runs) ", font, green, screen, 50, 50) |
42 | 40 | elif second_innings_score > first_innings_score: |
43 | | - draw_text(f"{shared.second_batting_team} Wins! ({second_innings_score} Runs vs {first_innings_score} Runs)", font, green, screen, 50, 50) |
| 41 | + draw_text(f" {shared.second_batting_team} Wins! ({second_innings_score} Runs vs {first_innings_score} Runs) ", font, green, screen, 50, 50) |
44 | 42 | else: |
45 | | - draw_text(f"It's a Draw! ({first_innings_score} Runs vs {second_innings_score} Runs)", font, green, screen, 50, 50) |
| 43 | + draw_text(f" It's a Draw! ({first_innings_score} Runs vs {second_innings_score} Runs) ", font, green, screen, 50, 50) |
46 | 44 |
|
47 | 45 | for event in pygame.event.get(): |
48 | 46 | if event.type == pygame.QUIT: |
|
0 commit comments