Guest User

Untitled

a guest
May 26th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. #Build console based RPG using all the concepts learned about python
  2. #include items, gold, rooms, randomly generated landscape of rooms, different enemy types, items, shops, map printing, bosses, chests ->
  3. #enemies sometimes dropping things,
  4. #exceptions, dictionaries, tuples, list slices, list comprehensions, map, flighter, lambdas, generators, recurshion, sets
  5.  
  6. from player import *
  7. from room import *
  8. import random
  9.  
  10.  
  11. class Game:
  12. def __init__(self):
  13. self.gameName = "rpgLand"
  14.  
  15. def greeting(self):
  16. print("Hello adventurer! Welcome to the world.")
  17. self.getNameCreatePlayer()
  18.  
  19. def getNameCreatePlayer(self):
  20. name = input("What is your name, traveller?\n")
  21. player1 = Player(name)
  22. print("welcome {}".format(name))
  23.  
  24. #keeps going through rooms a set amount until None is reached, and attaches a room. Always starts at beggining room.
  25. def generateDungeon(self):
  26. head = Room(None, None, None, None, None)
Add Comment
Please, Sign In to add comment