Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selecting how many times to expand the capacity #97

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

Simopich
Copy link

@Simopich Simopich commented Jul 15, 2019

Just added these few lines to select how many times do you want to increase the capacity, with a check of the input.

Changes:

###Checking if the input is valid
valid = False
while not valid:
try:
increase_times = int(input("How many times do you want to increase the capacity? (" + Fore.YELLOW + Style.BRIGHT + "+5 per time" + Style.RESET_ALL + "): "))
valid = True
except ValueError:
print(Fore.RED + Style.BRIGHT + "That's not a valid number.")
### Checking if you have enough Dragon Stones
if increase_times > get_user()['user']['stone']:
print(Fore.RED + Style.BRIGHT+ "You don't have enough Dragon Stones.")
pass
### Increasing the capacity
else:
for _ in range(increase_times):
increase_capacity()

@Simopich
Copy link
Author

@GOKU-SA Thanks for the idea.

@GOKU-SA
Copy link

GOKU-SA commented Jul 15, 2019

No problem, glad to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants