def fastclone(self, theState): newBoard = None # For speed, preallocate the lists at their eventual size ants1 = [] ants2 = [] cons1 = [None] * len(theState.inventories[PLAYER_ONE].constrs) cons2 = [None] * len(theState.inventories[PLAYER_TWO].constrs) cons3 = [None] * len(theState.inventories[NEUTRAL].constrs) antIndex1 = 0 antIndex2 = 0 conIndex1 = 0 conIndex2 = 0 conIndex3 = 0 # clone all the entries in the inventories # deleted the fillers for the ants for constr in theState.inventories[PLAYER_ONE].constrs: cons1[conIndex1] = constr.clone() conIndex1 += 1 for constr in theState.inventories[PLAYER_TWO].constrs: cons2[conIndex2] = constr.clone() conIndex2 += 1 for constr in theState.inventories[NEUTRAL].constrs: cons3[conIndex3] = constr.clone() conIndex3 += 1 # clone the list of inventory objects food1 = theState.inventories[PLAYER_ONE].foodCount food2 = theState.inventories[PLAYER_TWO].foodCount newInventories = [Inventory(PLAYER_ONE, ants1, cons1, food1), Inventory(PLAYER_TWO, ants2, cons2, food2), Inventory(NEUTRAL, [], cons3, 0)] return GameState(newBoard, newInventories, theState.phase, theState.whoseTurn)
def test_player_creation(s): with s.assertRaises(ValueError): p = Unit.Player('Nome', Inventory.Inventory(), 0, -1, -3, -4, -5, 6, 7, 8) with s.assertRaises(ValueError): p = Unit.Player('Nome', Inventory.Inventory(), 1, 2, 3, 4, 5, 0, 7, -8) with s.assertRaises(ValueError): p = Unit.Player('Nome', Inventory.Inventory(), 1, 2, 3, 4, 5, 6, 8, 8) p = Unit.Player('Nome', Inventory.Inventory(), 1, 2, 3, 4, 5, 6, 7, 8) s.assertEqual(p.name, 'Nome') s.assertEqual(p.max_health, 1) # health tem que ser no máximo max_health s.assertEqual(p.health, 1) s.assertEqual(p.attack, 3) s.assertEqual(p.defense, 4) s.assertEqual(p.agility, 5) s.assertEqual(p.level, 6) s.assertEqual(p.exp, 7) s.assertEqual(p.exp_to_next, 8) s.assertFalse(p.max_health <= 0) s.assertFalse(p.health <= 0) s.assertFalse(p.attack <= 0) s.assertFalse(p.defense <= 0) s.assertFalse(p.agility <= 0) s.assertFalse(p.level <= 0) s.assertFalse(p.exp < 0) s.assertFalse(p.exp_to_next <= 0)
def process_file(): #Create empty dictionary inventory_dict = {} #Open inventory data inventory_data = open("Inventory.txt", "r") value = [] #Read data from file for line in inventory_data: value.append(line.strip()) if len(value) == 4: #Store information in separate variable item_id = value[0] name = value[1] quantity = int(value[2]) price = float(value[3]) #Create an instance inventory_item = Inventory.Inventory(item_id, name, quantity, price) #Add item to dictionary inventory_dict[item_id] = inventory_item value.clear() #Close file inventory_data.close() #Return dictionary return inventory_dict
def main(): try: db = 'vend.db' inv = I.Inventory(db) vend(inv) except IOError: print("DB Not Found!!")
def __init__(self, window, map): self.x = 0 self.y = WINDOW_HEIGHT - 6 * TILE_SIZE Globals.window = window self.velocity = 0 self.map = map self.maxHealth = 100 self.health = 0 self.dead = False self.showDamage = False self.DamageTaken = "" self.CountDownShowDamage = 0 self.CountDownRegen = 0 self.lastSprite = Player.Player_left self.CanMoveLeft = True self.CanMoveRight = True self.inventory = Inventory(5) self.attack = 25 self.ActiveWeapon = None self.draw()
class Player(Entity): sprite_path = os.path.join(resource_path, 'player.png') HP = 10 DEF = 1 ATK = 4 inventory = Inventory(10) def interract(self, player): return def attack(self, entity): damage = random.randint(self.ATK - 3 - entity.DEF, self.ATK - entity.DEF) entity.HP = min(entity.HP, entity.HP - damage) def inspect(self): return "HP : " + str(self.HP) + " DEF : " + str(self.DEF) def getHP(self): return self.inventory.getHP() + self.HP def getDEF(self): return self.inventory.getDEF() + self.DEF def getATK(self): return self.inventory.getATK() + self.ATK
def start(self): '''Start a game''' #create some weapons phaser = Weapon.Weapon("Phaser", 100.00, "pistol", "energy", 1, 12, True) shredder = Weapon.Weapon("Shredder", 1000.00, "smg", "9mm", 120, 120, False) weapons = [phaser, shredder] #create the inventory inventory = Inventory.Inventory(weapons=[], ammo=10) inventory.addWeapons(weapons) #create the player player = Player.Player("Shadow", 18, inventory) player.description() print(Weapon.Weapon.isEquipped(phaser)) print(Weapon.Weapon.isEquipped(shredder)) Weapon.Weapon.fireWeapon(phaser) Weapon.Weapon.fireWeapon(phaser) Weapon.Weapon.reloadWeapon(phaser, inventory) print("rounds = {0}".format(phaser.numRounds)) print("ammo = {0}".format(inventory.ammo))
def __init__(self, x, y, speed, image, nbAnimsFrames, pace): super(Player, self).__init__(x, y, speed, image, nbAnimsFrames, pace) self.inventory = Inventory(((1024 / 2) - int((148 * 1.5) / 2)) + 25, 768 - int(39 * 1.5), self) self.spacepressed = False self.moving = True self.life = 3
def loadInventory(player): inventoryInfile = open(inventoryData, 'rb') inventorySave = pickle.load(inventoryInfile) items = [] for item in inventorySave[2]: items.append(Items.Item(item[0], item[1], item[2], item[3], item[4], item[5])) return Inventory.Inventory(inventorySave[0], inventorySave[1], items, player)
def inventory_added(request,sid): if 'product_id' in request.GET and request.GET['product_id'] and 'qty' in request.GET and request.GET['qty'] and 'cp' in request.GET and request.GET['cp'] and 'sp' in request.GET and request.GET['sp'] and 'minqty' in request.GET and request.GET['minqty']: product_id = request.GET['product_id'] qty = request.GET['qty'] minqty = request.GET['minqty'] sp = request.GET['sp'] cp = request.GET['cp'] if request.GET['ed']: ex = request.GET['ed'] else: ex=None inv = Inventory.objects.filter(store_id=sid,product_id_id=product_id) batchid = random.randint(1,99999) ids = [] for i in inv: ids.append(i.batch_id) while(batchid in ids): batchid = random.randint(1,99999) batch = Inventory(product_id_id=product_id,batch_id=batchid,store_id_id=sid,qty=qty,minimum_qty=minqty,selling_price=sp,cost_price=cp,expiry_date=ex) batch.save() messageadd = 'New inventory has been successfully added' store = Store.objects.get(store_id=sid) batches = Inventory.objects.filter(store_id=sid) context = {'store':store,'messageadd':messageadd,'batches':batches} return render(request,'inventory_control.html',context)
def __init__(self, center_x, center_y, animation_images, saved_params=None): super().__init__(center_x, center_y, animation_images) self._max_health = self._max_mana = self._max_stamina = 100 self._speed_changing = 3 self._amount_damage = random.randint(140, 200) self._passive_regeneration = 0.1 self._regeneration_interval = 10 self._last_attack_time = 250 self._animation_interval = 150 self._experience_up_level = 1000 * pow(1.1, self._level) self._selected_attack = GameEnums.AttackTypes.FIREBALL.value self._inventory = Inventory.Inventory() self._health_bar = Bar.Bar(Constants.GAME_WINDOW_WIDTH // 2 - 250, Constants.GAME_WINDOW_HEIGHT - 96, 'resources/images/bars/health_bar.png') self._mana_bar = Bar.Bar(Constants.GAME_WINDOW_WIDTH // 2 + 155, Constants.GAME_WINDOW_HEIGHT - 96, 'resources/images/bars/mana_bar.png') if saved_params is None: self._level = 1 self._current_experience = 0 self._current_health = 100 self._current_stamina = self._max_stamina self._current_mana = self._max_mana else: self._level = saved_params['level'] self._current_experience = saved_params['current_experience'] self._current_health = saved_params['current_health'] self._current_stamina = saved_params['current_stamina'] self._current_mana = saved_params['current_mana']
def __init__(self): Player.playerPos = [ Helper.RESOLUTION[0] * 0.5 - Player.playerSurf.get_width() * 0.5, Helper.RESOLUTION[1] * 0.2 - Player.playerSurf.get_height() * 0.5 + 600 ] Player.playerRect.x = Player.playerPos[0] Player.playerRect.y = Player.playerPos[1] Player.moveSpeed = Helper.MOVE_SPEED Player.moveDistance = Helper.MOVE_DISTANCE if Player.playerInstances == 0: Player.playerInstances += 1 else: raise ValueError('Attempted to create another instance of Player') Entity.Entity.__init__(self) self.exp_to_level_up = Helper.EXP_REQUIRED self.exp = 0 Player.max_health = Entity.Entity.defaultHealth * 100 Player.health = Player.max_health Player.healthBar = Entity.HealthBar(self) Player.playerInstance = self Player.Inventory = Inventory.Inventory() Player.Backpack = Inventory.Backpack()
def _get_player_items(s, p): inventory = Inventory() for i in p.findall('inventory/item'): inventory.put(( i.get('quantity'), i.get('name'), )) return inventory
def _get_creature_items(s, c): inventory = Inventory() for i in c.findall('inventory/item'): inventory.put(( i.get('quantity'), i.get('name'), )) return inventory
def __init__(self): self.HP = None self.maxHP = None self.minDamage = None self.maxDamage = None self.MP = None self.armor = None self.inventory = Inventory()
def __init__(self): self.bank = Bank.Bank() self.inventory = Inventory.Inventory() self.dayCounter = 0 self.servedCustomers = 0 self.satisfiedCustomers = 0 self.popularity = 0 self.cost = 0
def test_player_methods(s): p = Unit.Player('Nome', Inventory.Inventory(), 3, 1, 1, 4, 5, 6, 7, 8) s.assertEqual(p.health, 1) p.heal(1) s.assertEqual(p.health, 2) p.heal(10) s.assertEqual(p.health, p.max_health) with s.assertRaises(ValueError): p.heal(-45)
def setUp(self): self.Store = Inventory(store_name) for year in years: for week in weeks: for item in items_upper: self.Store.item_count(item, randint(1, 100), week, year) for week in list(range(1, current_week + 1)): for item in items_upper: self.Store.item_count(item, randint(1, 100), week, current_year)
def __init__(self, x, y): super().__init__() self.image = pygame.Surface([32, 32]) self.image.fill((255, 128, 128)) self.rect = self.image.get_rect() self.rect.x = x self.rect.y = y self.movex = 0 self.movey = 0 self.inventory = Inventory()
def __init__(self, sprites, animations, current_sprite, world_i, name): Entity.__init__(self, sprites, animations, world_i, name) self.position = (150, 300) self.current_sprite = current_sprite self.sprite = None self.command = None self.active = False self.inventory = Inventory(self.entity_i) self.add_hero_listeners()
def load(self, filename): # Store filename for later use self.filename = filename self.document = xml.dom.minidom.parse(self.filename) # Let's asume this is a valid file and # the needed elements are there. # Load the playtime for profiling reasons playTimeElement = self.document.getElementsByTagName("playtime")[0] self.seconds = int(playTimeElement.getAttribute("seconds")) self.startTime = self.engine.getTicks() # Start by loading the records, because they are needed by the map recordsElement = self.document.getElementsByTagName("records")[0] self.records = str(recordsElement.firstChild.data).split() # Now we can safely load the map mapElement = self.document.getElementsByTagName("map")[0] self.currentMap = self.mapLoader.loadMap( str(mapElement.getAttribute("filename"))) self.currentMap.setCurrentLayer(int(mapElement.getAttribute("layer"))) self.mapManager.setCurrentMap(self.currentMap) # Now that we have a map we can place the player in it playerElement = self.document.getElementsByTagName("player")[0] self.player = annchienta.Person( str(playerElement.getAttribute("name")), str(playerElement.getAttribute("config"))) playerPosition = annchienta.Point( annchienta.IsometricPoint, int(playerElement.getAttribute("isox")), int(playerElement.getAttribute("isoy"))) # Add the player to the map and give him control self.currentMap.addObject(self.player, playerPosition) self.player.setInputControl() self.mapManager.cameraFollow(self.player) self.mapManager.cameraPeekAt(self.player, True) # Load our inventory inventoryElement = self.document.getElementsByTagName("inventory")[0] self.inventory = Inventory.Inventory(inventoryElement) # Load the team teamElement = self.document.getElementsByTagName("team")[0] self.team = map(Ally.Ally, teamElement.getElementsByTagName("combatant"))
def __init__(self, startingx, startingy, width, height): pygame.sprite.Sprite.__init__(self) self.image = pygame.Surface([width, height]) self.image.fill(GREEN) self.rect = self.image.get_rect() self.rect.centerx = width / 2 self.velocity = 4 self.deltax = 0 self.deltay = 0 self.rect.x = startingx self.rect.y = startingy self.inventoryToggle = False self.inventory = Inventory() self.dir = 0 #down 1: left 2: right 3: up self.stamina = 100 #power used to swing the sword self.magic = 100 #power used to use the damage shield #maybe ill add a fireball as well player_sprite.add(self) camera_sprite.add(self)
def __init__(self, json_data): super().__init__( json_data.GetAnimation("player_idle_right").GetFirstFrame(), 300, 1200) self.alive = True self.maximum_health = 10 self.current_health = self.maximum_health self.maximum_mana = 10 self.current_mana = self.maximum_mana self.inventory = Inventory.Inventory() self.npc_talking_to = None self.Spells = json_data.spells self.spell_1 = self.Spells[0] self.idle_right_animation = json_data.GetAnimation("player_idle_right") self.idle_left_animation = self.idle_right_animation.GetMirrorAnimation( ) self.walking_right_animation = json_data.GetAnimation( "player_walking_right") self.walking_left_animation = self.walking_right_animation.GetMirrorAnimation( ) self.attacking_left_animation = json_data.GetAnimation( "player_attacking_left") self.attacking_right_animation = self.attacking_left_animation.GetMirrorAnimation( ) self.current_animation = self.idle_right_animation self.attacking = False self.make_attack = False self.jump_pressed = False self.up_pressed = False self.right_pressed = False self.down_pressed = False self.left_pressed = False self.can_jump = False self.movement_speed = 5.0
def __init__(self, *args, **kwargs): """ Main class constructor """ super().__init__(*args, **kwargs) # Load key handlers self.key_handler = pyglet.window.key.KeyStateHandler() self.push_handlers(self.key_handler) # Load texture loader self.texture_loader = TextureLoader(TEXTURE_PATH) # Implements update function to pyglet pyglet.clock.schedule(self.update) # Framerate variables self.last_time_framerate = time.time() self.frames_passed = 0 self.framerate = pyglet.text.Label(text='Unknown', font_size=32, x=10, y=10, color=(255, 255, 255, 255)) self.player_location_label = pyglet.text.Label(text='Unknown', font_size=24, x=1450, y=1040, color=(255, 255, 255, 255)) self.player = Player((0.5, 18, 0.5), (60, 90)) self.world = World(self.texture_loader) self.inv = Inventory(self.width, self.height) # Creates a player target self.player_target = pyglet.graphics.vertex_list( 4, ('v2i', (self.width // 2 - TARGET_SIZE, self.height // 2, self.width // 2 + TARGET_SIZE, self.height // 2, self.width // 2, self.height // 2 - TARGET_SIZE, self.width // 2, self.height // 2 + TARGET_SIZE)))
def __init__(self): self.mode = MODE_COMMANDS # Other is MODE_USERPLAY where you are in control of the hero if CURSES: # Initialize curses cbreak() noecho() # Initialize the Kernel Kernel() # Set's up the socket NethackSock() # Socket observers SocketLogger( ) # This should be before other stuff for easier debugging FramebufferParser() DGLParser() # Stuff Console() Cursor() Dungeon() Hero() MonsterSpoiler() ItemDB() Inventory() # AI Personality() Senses() Pathing() # Brains curBrain = TestBrain() Kernel.instance.Personality.setBrain(curBrain) # Default brain
return False for k in range(0, len(state1Inv.ants)): if state1Inv.ants[i] != state1Inv.ants[i]: return False if state1Inv.foodCount != state2Inv.foodCount: return False return True # # # Unit Test # Description: Test's that given a game state, that it expands accordingly, and evaluates that state correctly. # # board = [[Location((col, row)) for row in xrange(0, BOARD_LENGTH)] for col in xrange(0, BOARD_LENGTH)] p1Inventory = Inventory(PLAYER_ONE, [], [], 0) p2Inventory = Inventory(PLAYER_TWO, [], [], 0) neutralInventory = Inventory(NEUTRAL, [], [], 0) putFood(neutralInventory) putOurInventory(p1Inventory) putTheirInventory(p2Inventory) state = GameState(board, [p1Inventory, p2Inventory, neutralInventory], PLAY_PHASE, PLAYER_ONE) expectedState = state.fastclone() expectedState.inventories[PLAYER_TWO].ants = [] ourAI = AIPlayer(PLAYER_ONE) move = Move(MOVE_ANT,[(0,6)], None)
def inputC(self, data): inventory = Inventory() data = inventory.menu(data) del inventory return data
import pygame import config import Player import Terrain import Inventory import showcoords pygame.init() window = pygame.display.set_mode((config.screen_width, config.screen_height)) pygame.display.set_caption("Minecraft2D") terrain = Terrain.Terrain() player = Player.Player(terrain) equipment = Inventory.Inventory() def update(ev): player.update(ev, terrain, equipment) equipment.update(ev) def draw(): window.fill((0, 0, 0)) terrain.draw(window, player) player.draw(window) equipment.draw(window) showcoords.draw(window, player) terrain.create_terrain()
spec['Value'] = 2945.95 spec['instrumentSpec'] = InstrumentSpec(properties) specList.append(spec) del spec, properties for s in specList: inventory.add_instrument(s['SerialNo'], s['Value'], s['instrumentSpec']) return # main inventory = Inventory() initializeInventory(inventory) # customer wanted properties = {} properties['builder'] = Builder.GIBSON properties['back_wood'] = Wood.MAPLE clientSpec = InstrumentSpec(properties) matchingInstruments = inventory.search(clientSpec) if matchingInstruments: print("You might like this") for instrument in matchingInstruments:
def loadData(newGame, name): global map, player, playerInventory, currentRoom, debug, achievements, timeBeforeEnd map = None player = None playerInventory = None currentRoom = None debug = False achievements = None timeBeforeEnd = None pygame.init() # global map, player, playerInventory, currentRoom if newGame: Text.reset() player = Player.Player(name, 1, 0, 100, 4, x, y, velocity, "Entities/Player/Player_Idle_1.png", 1, "RIGHT", Text.achievements, window) playerInventory = Inventory.Inventory(player.name + "'s Inventory", 12, [], player) playerInventory.contents = [] map = [ Room.Room("Middle Room", "Images/map_middle.png", [ Entity.getEntityByName("largemushroom", 550, 150, player, playerInventory, window), Entity.getEntityByName("Troll", 650, 150, player, playerInventory, window) ], 0, "MIDDLE", ["WEST", "EAST", "SOUTH", "NORTH"], [(260, 15), (280, 15), (300, 15), (320, 15), (340, 15), (360, 15), (380, 15), (400, 15), (420, 15), (440, 15), (660, 15), (700, 15), (740, 15), (780, 15), (820, 15), (860, 15), (460, 15), (480, 15), (880, 15), (240, 235), (240, 255), (260, 255), (280, 255), (800, 275), (840, 275), (880, 275), (800, 235), (860, 235), (440, 610), (460, 610), (720, 775), (740, 695), (760, 775), (760, 675), (820, 675), (780, 755), (820, 755), (860, 755), (860, 675), (800, 635), (880, 715), (140, 635), (100, 635), (60, 635), (20, 635), (140, 315), (160, 315), (80, 275), (60, 275), (40, 275), (100, 295)]), Room.Room("First West Point", "Images/map-west.png", [ Entity.getEntityByName("Bear", 350, 200, player, playerInventory, window) ], 1, "WEST", ["EAST"], [(800, 535), (820, 535), (760, 595), (740, 675), (660, 695), (640, 695), (620, 695), (580, 715), (560, 715), (460, 735), (440, 735), (380, 715), (340, 715), (260, 735), (240, 735), (160, 715), (140, 655), (100, 655), (100, 575), (100, 495), (80, 415), (80, 335), (80, 275), (100, 195), (120, 75), (120, 95), (140, 95), (140, 55), (240, 55), (240, 75), (260, 75), (340, 75), (380, 75), (340, 15), (380, 15), (260, 15), (220, 15), (460, 55), (500, 55), (560, 55), (580, 55), (580, 75), (560, 75), (540, 75), (680, 35), (680, 55), (700, 55), (760, 135), (780, 135), (800, 195), (800, 215), (840, 215), (840, 175), (800, 115), (720, 15), (800, 595), (780, 695), (40, 255), (60, 195), (100, 55), (40, 415), (60, 535)]), Room.Room("First East Point", "Images/map-est.png", [], 2, "EAST", ["WEST"], [(30, 235), (50, 215), (50, 235), (70, 235), (90, 235), (110, 175), (90, 95), (50, 95), (150, 195), (150, 215), (170, 195), (190, 175), (210, 135), (210, -5), (210, 35), (230, 55), (250, -25), (250, 15), (270, 15), (70, 715), (90, 715), (110, 655), (90, 675), (110, 715), (130, 715), (130, 695), (150, 715), (150, 775), (190, 775), (170, 775), (210, 795), (170, 835), (910, 815), (890, 855), (930, 855), (530, 395), (550, 395), (570, 395), (590, 395), (510, 455), (490, 475), (630, 475), (650, 475), (590, 335), (570, 335), (550, 335), (510, 335), (530, 335), (490, 335), (610, 335), (630, 335), (650, 335), (570, 415)]), Room.Room("First South Point", "Images/map-south.png", [ Entity.getEntityByName("bandit", 670, 190, player, playerInventory, window) ], 3, "SOUTH", ["MIDDLE"], [(360, 715), (380, 715), (400, 715), (340, 715), (300, 715), (260, 715), (320, 715), (240, 715), (200, 715), (200, 595), (200, 455), (200, 495), (200, 355), (200, 255), (200, 195), (220, 95), (220, 115), (240, 115), (260, 115), (280, 115), (300, 115), (340, 115), (360, 115), (380, 115), (400, 115), (420, 115), (440, 115), (460, 115), (500, 115), (480, 115), (520, 115), (560, 115), (580, 115), (620, 115), (660, 115), (700, 115), (740, 115), (780, 115), (800, 115), (800, 215), (800, 315), (800, 395), (800, 495), (800, 595), (800, 695), (780, 735), (780, 715), (760, 715), (720, 715), (680, 715), (640, 715), (620, 715), (600, 715), (500, 435), (500, 455), (520, 455), (560, 455), (480, 455), (460, 455), (580, 455), (540, 435), (380, 315), (400, 315), (420, 315), (440, 315), (460, 315), (520, 315), (540, 315), (560, 315), (580, 315), (600, 315)]), Room.Room("Starting Map", "Images/map-north (1).png", [ Entity.getEntityByName("largemushroom", 750, 50, player, playerInventory, window), Entity.getEntityByName("largemushroom", 770, 770, player, playerInventory, window), Entity.getEntityByName("largemushroom", 700, 740, player, playerInventory, window) ], 3, "NORTH", ["SOUTH"], [(300, 695), (380, 715), (320, 655), (240, 675), (260, 695), (180, 655), (220, 695), (140, 695), (120, 655), (80, 675), (60, 755), (40, 795), (80, 815), (120, 815), (160, 815), (220, 815), (260, 835), (320, 795), (300, 835), (380, 495), (400, 495), (400, 375), (400, 235), (580, 235), (580, 355), (580, 475), (580, 495), (620, 495), (660, 495), (700, 495), (740, 495), (800, 495), (780, 495), (860, 495), (820, 495), (900, 495), (940, 495), (980, 495), (620, 235), (660, 235), (700, 235), (760, 235), (800, 235), (840, 235), (880, 235), (920, 235), (960, 235), (980, 235), (320, 235), (360, 235), (260, 235), (180, 235), (220, 235), (280, 235), (140, 235), (100, 235), (40, 235), (60, 235), (40, 355), (40, 455), (40, 495), (60, 495), (100, 495), (140, 495), (180, 495), (220, 495), (260, 495), (300, 495), (340, 495), (220, 35), (180, 35), (200, 35)]) ] currentRoom = map[4] else: player = Save.loadPlayer(window) achievements = Text.achievements playerInventory = Save.loadInventory(player) map = Save.loadRooms(player, playerInventory, window) currentRoom = map[Save.loadCurrentRoom()] setSolid()