private void initTileMap(String s) {
        InputStreamReader inputStreamReader = new InputStreamReader(this.getClass().getResourceAsStream(s));
        try (BufferedReader br = new BufferedReader(inputStreamReader)) {
            mapWidth = Integer.parseInt(br.readLine()); //reads first line
            mapHeight = Integer.parseInt(br.readLine()); //reads second line

            int height = mapHeight * tileSize;
            int width = mapWidth * tileSize;

            xmin = GamePanel.WIDTH - width;
            xmax = 0;
            ymin = GamePanel.HEIGHT - height;
            ymax = 0;

            map = new TileType[mapHeight][mapWidth]; //map represented as 2d array
            tiles = new Tile[mapHeight][mapWidth]; //tiles represented in 2d array


            String delimiter = " "; //separator for information in our file

            //Reading the rest of the map file:
            TileType tileType = TileType.NONE;
            for (int row = 0; row < mapHeight; row++) { //loop over rows (number of lines in map.txt)
                String line = br.readLine();
                String[] tokens = line.split(delimiter); //Splits the read line with the delimiter
                for (int col = 0; col < mapWidth; col++) { //loop over columns
                    int numTile = Integer.parseInt(tokens[col]); //inserts the parsed int array into the correct column
                    switch (numTile) {
                        case 0:
                            tileType = TileType.TYPE1;
                            break;
                        case 1:
                            tileType = TileType.NONE;
                            break;
                        case 2:
                            tileType = TileType.OUTSIDE;
                            break;
                        case 3:
                            tileType = TileType.FALLTILE;
                            break;
                        case 4:
                            tileType = TileType.VICTORYTILE;
                            break;
                        case 5:
                            tileType = TileType.WATERTILE;
                            break;
                    }
                    map[row][col] = tileType; //insert TileType-Enum in map-array for every tile
                }
            }

        } catch (IOException e) {
            e.printStackTrace();
        }

    }