#NEWLINE# def parseCursor( self , cursor ) : #NEWLINE# #INDENT# start = 1 #NEWLINE# if ( ( len ( cursor ) > 1 ) and ( cursor [ ( - 1 ) ] != 'H' ) ) : #NEWLINE# #INDENT# start = int ( cursor [ : ( - 1 ) ] ) #NEWLINE# #UNINDENT# if ( cursor [ ( - 1 ) ] == 'C' ) : #NEWLINE# #INDENT# self . x += start #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cursor [ ( - 1 ) ] == 'D' ) : #NEWLINE# #INDENT# self . x -= start #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cursor [ ( - 1 ) ] == 'd' ) : #NEWLINE# #INDENT# self . y = ( start - 1 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cursor [ ( - 1 ) ] == 'G' ) : #NEWLINE# #INDENT# self . x = ( start - 1 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cursor [ ( - 1 ) ] == 'H' ) : #NEWLINE# #INDENT# if ( len ( cursor ) > 1 ) : #NEWLINE# #INDENT# ( y , x ) = map ( int , cursor [ : ( - 1 ) ] . split ( ';' ) ) #NEWLINE# y -= 1 #NEWLINE# x -= 1 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ( x , y ) = ( 0 , 0 ) #NEWLINE# #UNINDENT# self . x = x #NEWLINE# self . y = y