Conversation
Added: - a json file that stores the amount of gold
Added: - new class for player graphical user interface - changed the quantity in the player wallet
Added: - basic logic to the player gui
Added: - drew the gui onto the screen
Removed: - unused code
Changed: - position of the text to top right - setup to use the json data
Changed: - money changes dynamically
Added: - when buying, a placeholder amount will be taken from the players money - when selling, a placeholder amount will be given to the player
Added: - helper methods for using the wallet json file
Fixed: - gui not using the json file - when changing wallet.json the json file would save differently - selling gave a error Added: - buying works correctly - selling works correctly - every item has a price
Added: - when opening shop the price is now visible of each item
Fixed: - when buying a placeholder amount was deducted instead of the actual price
Removed: - code in player gui
Fixed: - typehints with ruff
ultimateownsz
left a comment
There was a problem hiding this comment.
Hey @Davidek523 I'm not sure yet what you have done exactly. I see you made acceptance criteria and checked those, but there are no tasks surrounding what you did. It's a good start, though, and we need to come together to find common ground what the best solution for a basic economy is.
I have some ideas that we could implement to make it more clear what the economy can do for Pyceas, but it's still not very clear what the initial player can do if they have a currency. It would be wise to hold off this issue because the implementation is not very high in priority.
src/states/player_gui.py
Outdated
| self.font = pygame.font.Font(None, 36) | ||
| self.screen = pygame.Surface((SCREEN_WIDTH, SCREEN_HEIGHT)) | ||
|
|
||
| def udpate(self, events): |
There was a problem hiding this comment.
You made a spelling mistake here
There was a problem hiding this comment.
What's the reason to store the currency.py in the utils directory?
Code Pull Request Template
Summary
This PR Adds a basic economy into the game, every item has a price now. The player has a storage for his gold. When buying or selling the player's gold will be updated.
Related Issues
This PR issue(s) closes issue #113
✅ Checklist:
Optional:
🏷️ Labels:
type: ...area: ...game: ...