Text File Format

I have finally created a makeshift text file format that actually works. I loaded it into the program and then loaded it out and it was unchanged. This would have been pretty easy, except that I did a lot of formatting of the text file so it was hard to get the data back into a class object. The key was using nameOfInputStream.ignore(‘largenumberhere’, ‘ ‘);, and then hardcoding the skips over the formatted stuff.

For reference, here is one completed defensive play file:
Title: dummy
Positions: 0,1,2,3,4,5,6,7,8,9,10,
StartingPosX: 0,1,2,3,4,5,6,7,8,9,10,
StartingPosY: 0,1,2,3,4,5,6,7,8,9,10,
Job: 0,1,2,3,4,5,6,7,8,9,10,
ZoneSpotX: 0,1,2,3,4,5,6,7,8,9,10,
ZoneSpotY: 0,1,2,3,4,5,6,7,8,9,10,
OppMan: 0,1,2,3,4,5,6,7,8,9,10,
rushGap: 0,1,2,3,4,5,6,7,8,9,10,

Honestly, the advantage of text files is that I can just make a huge number of copies, then change the values so that I can create all the possible plays that I want.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s