Experiementing With Classes
- 3 Devlogs
- 1 Total hours
This project is focused around experimenting and developing my knowledge of classes within python!
This project is focused around experimenting and developing my knowledge of classes within python!
Today I began working on the core game logic, taking everything i have learnt and implementing it into a terminal based game! I have currently implemented three classes, each encapsulating methods and attributes (i.e. inventory have getters and setters). I hope by the next devlog, the core logic is 70% done (currently 25%)….
I have learnt how to use multiple inheritance and how aggregation and composition works. Below is the exemplar code I wrote to demonstrate the relationship. Using this knowledge, and the previous code I am now going to implement private and protected methods to ensure people cannot exploit my game as I begin to create it.
I have created a simple system for the back end of my game, which has a simple class which will contain an inventory. Using this I will now create a new project for a potential CLI game…