So I am reading in a configuration file for a game. It holds data about the type of symbols the game has and the possible winning combinations of symbols. I wrote this program for a simpler configuration file where all of the symbols were on two characters. So I only had to read those two characters.
Now I have a line like this:
3 Silver7 Bell Bar : 2
And I need to read each of those strings into a separate variable. I'm hoping someone has ideas for a good way to do this. Also, please note that I am not using Java for this project(I know how to do this very easily in Java), I'm hoping to get some ideas as to what processes I can use.
"If the facts don't fit the theory, get new facts" --Albert Einstein
Well the company I am working for this summer has asked me to do this project in Python. I know this isn't a python forum; I'm just trying to get some ideas for determining how many characters to read into one variable.
so if I have something like:
Silver7 Bell Bar //I could look at this line and see that Silver7 is 7 chars long, Bell is 4 chars long, and Bar is 3 chars long
//so I would know to read in 7, then 4, then 3 chars
What I currently do is:
This only works for 2 characters however, I am looking for a more flexible solution since this program will be reading in a lot of these files.
(Note: the reason I posted this in the Java section was because the moderators there have been very helpful with my Java issues, I was looking more for ideas than language help)