Java game collision
<p>I have a problem with collision in my game. I made something like a level map. It looks like a two dimensional array [15],[10].
Im inserting data into array from a text document which looks something like this:</p>

<pre><code>111111111111111

1

1

1

1

1

1

1

1 

111111111111111
</code></pre>

<p>This is method for insert data into array:</p>

<pre><code>public void load(File file) throws IOException {
       BufferedReader reader = new BufferedReader(new FileReader(file));
       for (int y = 0; y &lt; 10; y++) {
           String line = reader.readLine();
           for (int x = 0; x &lt; 15; x++) {
                  char c = line.charAt(x);
                  if (c == '#')  {
                      level[x][y] = 1;
                  }
           }
      }
      reader.close();
}
</code></pre>

<p>Now I have a "table" with 1 and 0. When is some element in array "1", it means that these coordinates will be a box and with this box i need do a collision. I have a positions X and Y, which is marking pisitions of player.</p>
