def room_list(): """anyone can list rooms for viewing""" email = get_req("email") pager = get_req("pager") return room.get_rooms({"email": email, "pager": pager})
def get_player(): player_info = PlayerBackup.select().dicts()[0] print(player_info) name, items, coins, current_room_id, cooldown, visited_path = (player_info[k] for k in('name', 'items', 'coins', 'current_room_id', 'cooldown', 'visited_path')) visited = get_rooms() return Player(visited[current_room_id], name, items, cooldown, coins, eval(visited_path))
def __init__(self): #initialize program cmd.Cmd.__init__(self) self.dbfile = tempfile.mktemp() shutil.copyfile("database/quarenteendb.db", self.dbfile) self.loc = get_room(1, self.dbfile) self.gameItems = get_items(1, self.dbfile) self.gameRooms = get_rooms(1, self.dbfile) self.inventory = [] self.PrintIntro()
def __init__(self): self.rooms = get_rooms() self.current_room = "start" self.frame = 0 self.found_gold = False # Fishing stuff self.fishing = False self.fish_left = fish.copy() self.pond_fish = None self.hooked_fish = None self.current_fish = None
def rooms(): _rooms = room.get_rooms() return render_template('rooms.html',rooms=_rooms)