Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion connect-python/game.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import random, pprint
from teams import TEAM_CODES, name_changes_mlb
from search import search_player, suggest_single_solution, possible_solution
import secrets

pp = pprint.PrettyPrinter(indent=4)
TEAMS = TEAM_CODES
side_length = int(input("Enter the number of teams you want on one side of the square: "))
random = True if input("Random teams or custom? ").strip().lower() == 'random' else False
teams = []
if random:
teams = random.sample(TEAMS, side_length * 2)
teams = secrets.SystemRandom().sample(TEAMS, side_length * 2)
else:
for i in range(side_length):
teams.append(input("Enter Row Team {}: ".format(str(i+1))).strip().upper())
Expand Down