Creating a level class that holds all the data for the game, should the data be private?
Hello, I am currently questioning the idea of encapsulating the level class of my project. What I am thinking is that, the level class will store data for all other classes and methods to use so, it make sense to make the data as assecible as possible by making it public so any other class or method can just access it and modify it by using something like level.data1, level.data2 and so on.
Am I thinking wrong about this? Is really the best decision to encapsulate the whole class and create endless getters and setters and other operations, seems like its just going to bloat the code up and make things less readable
Am I thinking wrong about this? Is really the best decision to encapsulate the whole class and create endless getters and setters and other operations, seems like its just going to bloat the code up and make things less readable