Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Build console based RPG using all the concepts learned about python
- #include items, gold, rooms, randomly generated landscape of rooms, different enemy types, items, shops, map printing, bosses, chests ->
- #enemies sometimes dropping things,
- #exceptions, dictionaries, tuples, list slices, list comprehensions, map, flighter, lambdas, generators, recurshion, sets
- from player import *
- from room import *
- import random
- class Game:
- def __init__(self):
- self.gameName = "rpgLand"
- def greeting(self):
- print("Hello adventurer! Welcome to the world.")
- self.getNameCreatePlayer()
- def getNameCreatePlayer(self):
- name = input("What is your name, traveller?\n")
- player1 = Player(name)
- print("welcome {}".format(name))
- #keeps going through rooms a set amount until None is reached, and attaches a room. Always starts at beggining room.
- def generateDungeon(self):
- head = Room(None, None, None, None, None)
Add Comment
Please, Sign In to add comment