import random pokemon = {} #dict starter = {"Mudkip":"Water", "Torchic":"Fire", "Treecko":"Grass"} #dict route1 = ["Pidgey", "Poochyena", "Budew"] #list route2 = ["Pidgey", "Poochyena", "Machop", "Kricketot", "Skitty"] #list util = ("First", "Second", "Third") #Hvilken type er dette? def starters(): print("Choose your starter: ") for s in starter: print(s) choice = input() while choice.capitalize() not in starter: print("That is not a choice.") choice = input() addNewMember(choice.capitalize()) def addNewMember(newMember): pokemon[util[len(pokemon)]]=[newMember] def rnd(len): return random.randrange(len) def encounter(route): return route[rnd(len(route))] def release(): if len(pokemon) <= 1: print("You need to keep at least 1 Pokemon!") else: print("Releasing", pokemon[util[len(pokemon)-1]]) del pokemon[util[len(pokemon)-1]] def adventure(): starters() print("Great, you now have your first Pokemon!\nLet's go find another!\n") wild = encounter(route1) print("Entering route 1...\n") print("You encounter a wild", wild, "!") input() print("Go!", pokemon["First"], "!") print("You catch the wild", wild, "and add it to your team!") addNewMember(wild) print("Current team:", pokemon) input() release() print("Current team:", pokemon) adventure()