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

Added "run until valid" feature #56

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Added "run until valid" feature #56

wants to merge 2 commits into from

Conversation

akayy-dev
Copy link

Current Functionality

As of right now, the only option for generation of codes is to input the amount of codes you want the program to check for, this can get quite annoying long-term to have to check each periodically to restart the program.

Issue #34

Run Until Valid

My PR lets the user run the program for an indefinite amount of time until a valid code is found.

New behavior

Upon starting of the program, the user will be asked if he/she wants to run the program until a valid code is found or generate a specified amount of codes.

@akayy-dev akayy-dev mentioned this pull request May 26, 2021
@AcidClown
Copy link

Can someone add colors to it

@akayy-dev
Copy link
Author

Can someone add colors to it

idk if the maintainer of this project abandoned it or something but there is already an open pull request with this exact feature and more.

@logicguy1
Copy link
Owner

No deffenately not just busy with exams etc lately

@@ -38,9 +39,25 @@ def main(self): # The main function contains the most important code
time.sleep(2) # Wait a few seconds
self.slowType("Made by: Drillenissen#4268 && Benz#4947", .02) # Print who developed the code
time.sleep(1) # Wait a little more
self.slowType("\nInput How Many Codes to Generate and Check: ", .02, newLine = False) # Print the first question
self.slowType("\nRun until valid code is found? y/n ", .02, newLine = False)
infinite_choice = input('')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elif infinite_choice == "n" or infinite_choice == "N":
if infinite_choice == "y" or infinite_choice == "Y":

Those "or" in the beginning are unnecessary.
You could just use:

infinite_choice = input('').lower()

and then all of those wouldn't be necessary.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could add a .strip() to infinite choice too.
infinite_choice = input('').lower().strip()
making the user life easier.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or just use a check if it is in like if "y" in input.lower()

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

6 participants