public final void initWorld()
    {
        //create wall and gem objects
        Wall wall;
        Gem gem;
        
        //variables used to keep track of coordinates during loop
        int x = 0;
        int y = 0;
        
        for (int i = 0; i < level.length(); i++)
        {
            //Grab the item in string at i
            char item = level.charAt(i); 

            //Adjust X,Y value based on what character is at i
            //and create an item in the array list if needed
            if (item == '\n')
            {
                y += 1;
                x = 0;
            }
            else if (item == '#')
            {
                wall = new Wall(x,y);
                walls.add(wall);
                x += 1;
            }
            else if (item == '^')
            {
                player = new Player(x,y);
                x += 1;
            }
            else if (item == '$')
            {
                gem = new Gem(x,y);
                gems.add(gem);
                x += 1;
            }
            else if (item == '.')
            {
                home.SetX(x);
                home.SetY(y);
                x += 1;
            }
            else if (item == ' ')
            {
                x += 1;
            }
        }
        
        //Print the original map and legend
        System.out.print("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
        System.out.println("   Karel the Robot");
        System.out.print("Karel's directions: ^ North | "
                + "v South | > East | < West | ");
        System.out.println("# Walls | $ Gems | . Home");
        System.out.print(level);
        System.out.println("(Pick up all gems and go home)");
        
        //start up the game controller
        mController game = new mController();
    }