I just started to learn some architecture patterns and right now i’m learning about MVC while making a small project in c++.
In this specific project i have a list of Players (objects) that are composed by 6 strings, 2 integers and 2 floats, now in the view i need to display each Player with his attributes.
The question is: how do i do this? i cannot pass the list of Players because the View doesn’t know about the Player class (or the Model)
The only way i can think of to solve this is to write 6 setters for the strings, 2 setters for ints and 2 setters for floats, but this approach seems kinda bad because it leads to unmaintainable and unscalable code