Pokemon-Terminal/main.py
LazoCoder eba5afdfbb Added suggestions
If user types in “pika” it makes the background Pikachu. If the user
types “dra” then it suggest all the Pokemon who’s names start with
“drag”.
2017-04-21 02:23:49 -04:00

41 lines
1.1 KiB
Python

# The main module that brings everything together.
from sys import argv
import time
import printer
import backchanger
# Test each Pokemon in order, one by one.
def debug():
for x in range(1, 494):
backchanger.change_background(x)
time.sleep(0.25)
# Entrance to the program.
if __name__ == "__main__":
if len(argv) == 2:
arg = argv[1].lower()
if len(arg) == 1 and not arg.isdigit():
printer.print_pokemon_starting_with(arg)
elif arg == "regions":
printer.print_regions()
elif arg == "--help" or arg == "help" or arg == "-h":
printer.print_usage()
elif arg == "kanto":
printer.print_kanto()
elif arg == "johto":
printer.print_johto()
elif arg == "hoenn":
printer.print_hoenn()
elif arg == "sinnoh":
printer.print_sinnoh()
elif arg == "all" or arg == "pokemon" or arg == "list":
printer.print_all()
elif arg == "debug":
debug()
else:
backchanger.change_background(arg)
else:
printer.print_usage()