From 802228417f4bd732e6722ce6f5b8428e02620e52 Mon Sep 17 00:00:00 2001 From: bertieb Date: Thu, 30 Sep 2021 15:40:49 +0100 Subject: [PATCH] Teamicker should respect rows and cols specified --- teampicker.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/teampicker.py b/teampicker.py index f7bf494..01c8ecf 100644 --- a/teampicker.py +++ b/teampicker.py @@ -41,22 +41,22 @@ RED = (186, 20, 31) PURPLE = (121, 35, 158) screen = pygame.display.set_mode(SIZE) -pygame.display.set_caption("Sub Crown August 2021 Team Picker") +pygame.display.set_caption("Sub Crown September 2021 Team Picker") # Set up team text positioning references # # 26 teams so 3 cols, 9 rows -COLSTART = int(WIDTH/3) -COLWIDTH = int((WIDTH-COLSTART)/3) - -ROWSTART = int(HEIGHT/12) -ROWHEIGHT = int((HEIGHT-ROWSTART)/10) - TEAMSFILE = "teams.txt" TEAMNUMCOLS = 3 -TEAMNUMROWS = 10 +TEAMNUMROWS = 12 + +COLSTART = int(WIDTH/TEAMNUMCOLS) +COLWIDTH = int((WIDTH-COLSTART)/TEAMNUMCOLS) + +ROWSTART = int(HEIGHT/(TEAMNUMROWS+2)) +ROWHEIGHT = int((HEIGHT-ROWSTART)/TEAMNUMROWS) TEAMCOLS = [] TEAMROWS = []