Update indices according to the direction
if current_d == ' u ' : NEW_LINE INDENT i -= 1 NEW_LINE DEDENT elif current_d == ' d ' : NEW_LINE INDENT i += 1 NEW_LINE DEDENT elif current_d == ' l ' : NEW_LINE INDENT j -= 1 NEW_LINE DEDENT elif current_d == ' r ' : NEW_LINE INDENT j += 1 NEW_LINE DEDENT