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