I mainly program in C++ and I have been working on porting my game over to Java with Android. I ran into a short problem with some of my code. My text file is in this format:
0:1 0:0 1:1 2:2 3:3
I read it in with the fscanf function like so:
for(int Y = 0;Y < MAP_HEIGHT;Y++) {
for(int X = 0;X < MAP_WIDTH;X++) {
Tile tempTile;
fscanf(FileHandle, "%d:%d ", &tempTile.TileID, &tempTile.TypeID);
TileList.push_back(tempTile);
}
How would I read in the formatted data shown in Java? Obviously there is no fscanf lol afaik...
Maybe your code like this: