public static void updateMap(int new_x, int new_y, char symbol) 
    {
        int num_rows = 10; // The number of rows
        int num_cols = 20; // The number of columns. Does not include the \n
        int num_symbols = 4; // The number of symbols for Karel
        int old_x = -1;
        int old_y = -1;
        char[] karel_symbols = {'^', '<', '>', 'v'}; // Karels symbols
        
        /* Converting from level string to temporary string array */
        String[] convert_map = new String [num_rows];
        for (int i= 0; i < num_rows; i++)
        {
            int x = (i * (num_cols + 1));
            convert_map[i] = level.substring(x, (x + num_cols));
        }
    
        /* Finding the last place Karel was and removing it */
        for (int i = 0; i < num_rows; i++)
        {
            for (int h = 0; h < num_symbols; h++)
            {
                /* Iterating through all of the possible Karel symbols
                   and checking each string for their position. */
                int checker = convert_map[i].indexOf(karel_symbols[h]);
                if (checker != -1)
                {
                    old_y = i;
                    old_x = checker;
                    break;
                }
            }
        }
        
        /* Converting from temp string array to 2d character array*/
        char[][] current_map = new char [num_rows] [num_cols];
        for (int i = 0; i < num_rows; i++)
        {
            current_map[i] = convert_map[i].toCharArray();
        }
        if ((old_x != -1) && (old_y != -1))
        { // Making sure old_x and old_y were found
          current_map[old_y][old_x] = ' '; // Replacing Karel's old position
        }
        current_map[new_y][new_x] = symbol; // Putting Karel in his new position

        /* Overwriting level with updated map */
        String temp_level = new String();
        for (int i = 0; i < num_rows; i++)
        {
            for (int h = 0; h < num_cols; h++)
            {
                temp_level += current_map[i][h];
            }
            temp_level += '\n';
        }

        level = temp_level;
    }