Advertisement
Guest User

Game Shell Python

a guest
Sep 12th, 2012
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. class Toon:
  2.     def __init__(self, pname, prole):
  3.         self._pname = pname
  4.         self._prole = prole
  5.  
  6. def game(character):
  7.     print character._pname + " the " + character._prole + " begins their journey.."
  8.  
  9. cont = "yes"
  10. print "Welcome to <GameName>!"
  11. while cont.lower() == "yes":
  12.     name = raw_input("What is your character's name? ")
  13.     role = raw_input("What is your character's class? ")
  14.  
  15.     character = Toon(name, role)
  16.  
  17.     game(character)
  18.  
  19.     cont = raw_input("Your journey has ended, would you like to start a new game? ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement