public void loadTileMap(String file) {
        InputStream is = getClass().getResourceAsStream(file);
        BufferedReader br = new BufferedReader(new InputStreamReader(is));
        String delimiter = "\\s+";
        try {
            rowsInMap = Integer.parseInt(br.readLine());
            colsInMap = Integer.parseInt(br.readLine());
            map = new int[rowsInMap][colsInMap];
            for (int row = 0; row < rowsInMap; row++) {
                String input = br.readLine();
                String[] values = input.split(delimiter);

                for (int column = 0; column < colsInMap; column++) {
                    map[row][column] = Integer.parseInt(values[column]);
                }
            }
            
        } catch (IOException e) {
            System.out.println("IOException");
        }
    }