mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-12-17 08:00:13 +01:00
Redid setup logic, started adding more logic to deckbuilding
This commit is contained in:
parent
0ecf34210b
commit
d19c3c6db6
4 changed files with 270 additions and 611 deletions
23
main.py
23
main.py
|
|
@ -16,32 +16,20 @@ Path('csv_files').mkdir(parents=True, exist_ok=True)
|
|||
Path('staples').mkdir(parents=True, exist_ok=True)
|
||||
|
||||
while True:
|
||||
print('What would you like to do?')
|
||||
choice = 'Menu'
|
||||
while choice == 'Menu':
|
||||
question = [
|
||||
inquirer.List('menu',
|
||||
message='What would you like to do?',
|
||||
choices=['Initial Setup', 'Regenerate Card CSVs', 'Setup Staples', 'Build a Deck', 'Get Card Info', 'Quit'],
|
||||
choices=['Setup', 'Build a Deck', 'Get Card Info', 'Quit'],
|
||||
carousel=True)
|
||||
]
|
||||
answer = inquirer.prompt(question)
|
||||
choice = answer['menu']
|
||||
|
||||
# Run through initial setup
|
||||
while choice == 'Initial Setup':
|
||||
setup.initial_setup()
|
||||
choice = 'Menu'
|
||||
break
|
||||
|
||||
# Run through csv regeneration
|
||||
while choice == 'Regenerate Card CSVs':
|
||||
setup.regenerate_csvs()
|
||||
choice = 'Menu'
|
||||
break
|
||||
|
||||
# Setup staples
|
||||
while choice == 'Setup Staples':
|
||||
setup.generate_staple_lists()
|
||||
while choice == 'Setup':
|
||||
setup.setup()
|
||||
choice = 'Menu'
|
||||
break
|
||||
|
||||
|
|
@ -69,4 +57,5 @@ while True:
|
|||
|
||||
# Quit
|
||||
while choice == 'Quit':
|
||||
sys.exit()
|
||||
sys.exit()
|
||||
break
|
||||
Loading…
Add table
Add a link
Reference in a new issue