import java.io.*;
import java.util.*;
import java.awt.*;
public class FileInputExample2
{
static public void main(String[] args) throws IOException
{
int t;
BufferedReader filein;
filein = new BufferedReader (new FileReader("GridDATA.txt"));
int intGrid [] [] = new int [10] [10];
String inputLine = filein.readLine();
StringTokenizer st = new StringTokenizer(inputLine, " ");
for (int i=0; i<10; i++)
for (int j=0; j<10; j++)
{String eachNumber = st.nextToken();
intGrid [i] [j] = Integer.parseInt(eachNumber);
}
for (int i=0; i<10; i++)
for (int j=0; j<10; j++)
{
System.out.println( intGrid[i][j]);
}
}
}
this is what i have so far im trying to display this grid that i have the text file looks like this :
0 1 1 1 1 1 1 1 1 1
0 0 0 1 1 1 1 1 1 1
1 1 0 1 1 1 1 0 0 0
1 1 0 0 0 0 1 0 1 0
1 1 1 1 1 0 1 0 1 0
1 1 1 1 1 0 0 0 1 0
1 1 1 1 1 1 1 1 1 0
1 1 1 1 1 1 1 1 1 0
1 1 1 1 1 1 1 1 1 0
1 1 1 1 1 1 1 1 1 0
I have no idea why its not wokring. ultimatly i wil be makin a maze.