Two solutions:
1, maps the excel to the class, and then the class instantiation, save as a binary file, when entering the game directly the sequence words file to read data
Advantages: fast reading data
Weakness: when the class object, need a singleton class, singleton class stored in at least 2000 class object of key/value pair,
2, transfer excel to CSV, the CSV is saved as a binary file, after entering the game, read the CSV, resolved to response the class
Advantages: don't need a singleton class save all kind of key/value pair, can be directly obtained by the name of the class class,
Disadvantages: read data for the first time, need to parse a CSV,
Note: a class object is through key to save the data
If you you choose which kind of?
CodePudding user response:
One isWhy the singleton class?
Save as object, which will load which can be used to
CodePudding user response: