def enter(self): global doors print "You enter a purple room; the floor and the ceiling and every wall is " print "covered in plush and padded velvet that is a bright purple colour; a " print "hexagonal array of purple studs covers every surface, accentuating the " print "red velvety cushioning. Behind you is a",doors['behind'], "door, to the left is a " print doors['left'],"door, straight ahead is a",doors['ahead'], "door, to the right is a",doors['right'] print "door, in the middle of the ceiling is a",doors['ceiling'], "door, and in the middle of " print "the floor is a",doors['floor'], "door. There doesn't seem to be anything else in " print "this room. What door do you choose?" #can add another object clue global purplecount purplecount += 1 action = raw_input("> ") if "yellow" in action or "Yellow" in action: doors = {'behind': 'Black', 'left': 'Red', 'ahead': 'White', 'right': 'Blue', 'ceiling': 'Orange', 'floor': 'Purple'} portalactions.wallfloor() return 'yellow' elif "green" in action or "Green" in action: doors = {'behind': 'Black', 'left': 'Blue', 'ahead': 'White', 'right': 'Red', 'ceiling': 'Orange', 'floor': 'Purple'} portalactions.wallfloor() return 'green' elif "red" in action or "Red" in action: doors = {'behind': 'Black', 'left': 'Green', 'ahead': 'White', 'right': 'Yellow', 'ceiling': 'Orange', 'floor': 'Purple'} portalactions.wallfloor() return 'red' elif "blue" in action or "Blue" in action: doors = {'behind': 'Black', 'left': 'Yellow', 'ahead': 'White', 'right': 'Green', 'ceiling': 'Orange', 'floor': 'Purple'} portalactions.wallfloor() return 'blue' elif "black" in action or "Black" in action: doors = {'behind': 'Red', 'left': 'Yellow', 'ahead': 'Blue', 'right': 'Green', 'ceiling': 'Orange', 'floor': 'Purple'} portalactions.ceilingfloor() return 'black' elif "white" in action or "White" in action: doors = {'behind': 'Red', 'left': 'Green', 'ahead': 'Blue', 'right': 'Yellow', 'ceiling': 'Orange', 'floor': 'Purple'} portalactions.floorfloor() return 'white' #elif "object" in action or "Object" in action: #object() #raw_input("Back to room?" ) #return 'purple' else: print "\n" print "Aaaaaaand you still have a choice to make." print "\n" purplecount -= 1 return 'purple'
def enter(self): global doors print "You are in a completely white, cube-shaped room. The whiteness " print "gleams from every spotless surface and you cast no shadow. The " print doors['behind'],"door is behind you; on the left wall is a",doors['left'], "door, the wall " print "ahead has a",doors['ahead'], "door, on the right wall is a",doors['right'], "door. The ceiling " print "has a",doors['ceiling'], "door, and the floor has a",doors['floor'], "door. To the side of the " print "Blue door is a small terminal with a screen and keyboard. Choose a " print "door or examine the terminal?" global whitecount whitecount += 1 action = raw_input("> ") if "red" in action or "Red" in action: doors = {'behind': 'White', 'left': 'Yellow', 'ahead': 'Black', 'right': 'Green', 'ceiling': 'Orange', 'floor': 'Purple'} portalactions.door() return 'red' elif "blue" in action or "Blue" in action: doors = {'behind': 'White', 'left': 'Green', 'ahead': 'Black', 'right': 'Yellow', 'ceiling': 'Orange', 'floor': 'Purple'} portalactions.door() return 'blue' elif "green" in action or "Green" in action: doors = {'behind': 'White', 'left': 'Red', 'ahead': 'Black', 'right': 'Blue', 'ceiling': 'Orange', 'floor': 'Purple'} portalactions.door() return 'green' elif "yellow" in action or "Yellow" in action: doors = {'behind': 'White', 'left': 'Blue', 'ahead': 'Black', 'right': 'Red', 'ceiling': 'Orange', 'floor': 'Purple'} portalactions.door() return 'yellow' elif "purple" in action or "Purple" in action: doors = {'behind': 'Blue', 'left': 'Green', 'ahead': 'Red', 'right': 'Yellow', 'ceiling': 'Black', 'floor': 'White'} portalactions.floorfloor() return 'purple' elif "orange" in action or "Orange" in action: doors = {'behind': 'Red', 'left': 'Yellow', 'ahead': 'Blue', 'right': 'Green', 'ceiling': 'White', 'floor': 'Black'} portalactions.ceilingceiling() return 'orange' elif "terminal" in action or "Terminal" in action: return 'terminal' else: print "\n" print "Aaaaaaand you still have a choice to make." print "\n" whitecount -= 1 return 'white'