Compare commits

...

4 Commits

3 changed files with 30 additions and 26 deletions
Unified View
  1. +4
    -4
      subs.txt
  2. +8
    -6
      teampicker.py
  3. +18
    -16
      teams.txt

+ 4
- 4
subs.txt View File

@@ -1,8 +1,8 @@
costello_ costello_
ksyme99
hil42
rarestmonkey
mattgamerguy666 mattgamerguy666
meblu42
burgiuk burgiuk
maothecat
ksyme99
etho8282
idiotictendencies idiotictendencies
rarestmonkey

+ 8
- 6
teampicker.py View File

@@ -4,7 +4,7 @@
# #
# Two files provided: # Two files provided:
# - subs.txt -- 8 subscribers # - subs.txt -- 8 subscribers
# - teams.txt -- 26 teams
# - teams.txt -- 30 teams
# #
# Pseudocode: # Pseudocode:
# Split screen in 1:3 # Split screen in 1:3
@@ -21,7 +21,7 @@ import random
import pygame import pygame


pygame.init() pygame.init()
random.seed("BERTIE BEEF BAGGIO")
random.seed("bertieb")


HIGHLIGHTEVENT = pygame.USEREVENT + 1 # user specified event HIGHLIGHTEVENT = pygame.USEREVENT + 1 # user specified event
CLEAREVENT = pygame.USEREVENT + 2 # user specified event CLEAREVENT = pygame.USEREVENT + 2 # user specified event
@@ -31,7 +31,7 @@ SIZE = WIDTH, HEIGHT = 1920, 1080


BGIMG = pygame.image.load("sub_crown_bg_2.png") BGIMG = pygame.image.load("sub_crown_bg_2.png")


FONT = pygame.font.SysFont("Fetamont", 50)
FONT = pygame.font.SysFont("Fetamont", 45)
SUBFONTHEIGHT = 35 SUBFONTHEIGHT = 35
SUBFONT = pygame.font.SysFont("Fetamont", SUBFONTHEIGHT) SUBFONT = pygame.font.SysFont("Fetamont", SUBFONTHEIGHT)
OFFWHITE = (224, 224, 224) OFFWHITE = (224, 224, 224)
@@ -41,7 +41,7 @@ RED = (186, 20, 31)
PURPLE = (121, 35, 158) PURPLE = (121, 35, 158)


screen = pygame.display.set_mode(SIZE) screen = pygame.display.set_mode(SIZE)
pygame.display.set_caption("Sub Crown Nov 2020 Team Picker")
pygame.display.set_caption("Sub Crown August 2021 Team Picker")


# Set up team text positioning references # Set up team text positioning references
# #
@@ -56,7 +56,7 @@ ROWHEIGHT = int((HEIGHT-ROWSTART)/10)
TEAMSFILE = "teams.txt" TEAMSFILE = "teams.txt"


TEAMNUMCOLS = 3 TEAMNUMCOLS = 3
TEAMNUMROWS = 9
TEAMNUMROWS = 10


TEAMCOLS = [] TEAMCOLS = []
TEAMROWS = [] TEAMROWS = []
@@ -72,7 +72,7 @@ for i in range(TEAMNUMROWS):
SUBSFILE = "subs.txt" SUBSFILE = "subs.txt"
SUBS = [] SUBS = []


SUBNUMROWS = 8
SUBNUMROWS = 9
SUBROWHEIGHT = int((HEIGHT-ROWSTART)/9) SUBROWHEIGHT = int((HEIGHT-ROWSTART)/9)
SUBROWS = [] SUBROWS = []


@@ -160,6 +160,8 @@ def setup_team_board():
name = fh.readline().strip() name = fh.readline().strip()
if name == "": if name == "":
continue continue
if "donkey" in name:
name = name.split(' ', 1)[1]
print("Adding {} at {},{}".format(name, print("Adding {} at {},{}".format(name,
TEAMCOLS[col], TEAMCOLS[col],
TEAMROWS[row])) TEAMROWS[row]))


+ 18
- 16
teams.txt View File

@@ -1,26 +1,28 @@
Anaheim
Boston
Atlanta
Buffalo Buffalo
Calgary
Chicago Chicago
Cincinnati
Cleveland
Dallas Dallas
Denver
Detroit Detroit
Edmonton
Florida
Hartford
Green Bay
Houston
Indianapolis
Kansas City
Los Angeles Los Angeles
Montreal
Miami
Minnesota
New England
New Jersey New Jersey
NY Islanders
NY Rangers
Ottawa
New Orleans
New York
Oakland
Philadelphia Philadelphia
Phoenix
Pittsburgh Pittsburgh
Quebec
San Jose
St Louis
San Diego
San Francisco
Seattle
Tampa Bay Tampa Bay
Toronto
Vancouver
Washington Washington
Winnipeg

Loading…
Cancel
Save