🎮

Fantasy Game Inventory

Python47 lines· A small demo that manages a fantasy game player's inventory. It displays items and their counts, and supports adding loot (a list of items) to an e…
Original project by @ibra-kdbra — view source on GitHub
Ready when you are
README· what to build

Fantasy Game Inventory

A small demo that manages a fantasy game player's inventory. It displays items and their counts, and supports adding loot (a list of items) to an existing inventory dictionary.

Example

Inventory:
1   rope
6   torch
42   gold coin
1   dagger
12   arrow
Total number of items: 62
Inventory:
45   gold coin
1   rope
1   dagger
1   ruby
Total number of items: 48

How to run on localhost

python game-inventory.py

Dependencies

Standard library only.

fantasy-game-inventory.py· Python 3.x
39 lines
Console· terminal