public GridWorld(String inputFile)
    {
        try {
            BufferedReader br = new BufferedReader(new FileReader(inputFile));
            StringBuilder sb = new StringBuilder();
            String line = br.readLine();

            int worldWidth = 0, worldHeight = 0;

            //Read representation of world from file
            while (line != null)
            {
                sb.append(line);
                sb.append(System.lineSeparator());

                //Update world size
                if (line.length() > worldWidth)
                    worldWidth = line.length();
                worldHeight++;

                line = br.readLine();
            }

            this.worldHeight = worldHeight;
            this.worldWidth = worldWidth;
            char[] gridWorldString = sb.toString().toCharArray();

            gridWorld = new GridLocation[worldHeight][worldWidth];

            //Initialize the GridWorld to a multidimensional array of unwalkable locations
            for(int i = 0; i < worldHeight; i++)
                for(int j = 0; j < worldWidth; j++)
                    gridWorld[i][j] = new GridLocation(gridSize);

            //Update the GridWorld with the walkable locations
            int yLocation = 0;
            for (int i = 0; i < gridWorldString.length; i++)
            {
                //If the end of line is reached, move to next yLocation
                if (gridWorldString[i] == '\n')
                    yLocation++;
                //If the character is '1', the location is walkable
                else if (gridWorldString[i] == '1')
                    gridWorld[yLocation][i%(worldWidth+1)].SetWalkability(true);
            }

            /*
            //Print the representation of gridWorld
            for (int i = 0; i < gridWorld.length; i++)
            {
                for (int j = 0; j < gridWorld[i].length; j++)
                    System.out.print(gridWorld[i][j].toString());
                System.out.println();
            }*/

        } catch (IOException e)
        {
            System.out.println("IOException occurred while reading " + inputFile + ".");
            System.exit(1);
        }
    }