diff --git a/squirrelbattle/display/display_manager.py b/squirrelbattle/display/display_manager.py index 203fc82..f9b3f01 100644 --- a/squirrelbattle/display/display_manager.py +++ b/squirrelbattle/display/display_manager.py @@ -99,7 +99,7 @@ class DisplayManager: self.playerinventorydisplay.refresh( self.rows // 10, self.cols // 2, 8 * self.rows // 10, 2 * self.cols // 5) - displays.append(self.inventorydisplay) + displays.append(self.playerinventorydisplay) elif self.game.state == GameMode.STORE: self.storeinventorydisplay.refresh( self.rows // 10, self.cols // 2, diff --git a/squirrelbattle/tests/game_test.py b/squirrelbattle/tests/game_test.py index e079035..bc3ce12 100644 --- a/squirrelbattle/tests/game_test.py +++ b/squirrelbattle/tests/game_test.py @@ -539,9 +539,10 @@ class TestGame(unittest.TestCase): # The second item is not a heart merchant.inventory[1] = Sword() - # Buy the second item + # Buy the second item by clicking on it item = self.game.store_menu.validate() self.assertIn(item, merchant.inventory) + self.game.display_actions(DisplayActions.MOUSE, 8, 25) self.game.handle_key_pressed(KeyValues.ENTER) self.assertIn(item, self.game.player.inventory) self.assertNotIn(item, merchant.inventory)