Hello,
in a project I'm working on I'm trying to load in the attributes/stats of soccer players. Each of the 22 players has 15 values that I need to store (330 total). I was wondering if there was a way for me to enter all these variables into a file and have them loaded in during the program, since I don't want to have 330 lines of variables sitting in the main program file. What would be the best way to go about doing this? I tried using a class, but that didn't work, unless I was doing something wrong.
Also, is there a way code files and/or resources files could be used to do this. I saw them as a template option, but I'm not sure if I'd be able to use them for variables and how I would use them.
Example variables (for 22 players):
int player1speed = 90;
int player1shootingAccuracy = 80;
.
.
.
int player1goalsScored = 12;
Also, I have a PlayerData class, where I will want to load in the variables so that each object's variables will equal one of the corresponding 330 variables.