#NEWLINE# def visit_AugAssign( self , node ) : #NEWLINE# #INDENT# self . generic_visit ( node ) #NEWLINE# global game #NEWLINE# if ( ( len ( self . stack . current ( ) ) == 2 ) and ( len ( self . stack . last ( ) ) == 2 ) ) : #NEWLINE# #INDENT# if ( isinstance ( self . stack . last ( ) [ 0 ] , int ) and isinstance ( self . stack . last ( ) [ 1 ] , str ) and isinstance ( self . stack . current ( ) [ 0 ] , PPUSprite ) and isinstance ( self . stack . current ( ) [ 1 ] , str ) ) : #NEWLINE# #INDENT# address = getattr ( self . stack . current ( ) [ 0 ] , self . stack . current ( ) [ 1 ] ) #NEWLINE# self . stack . wipe ( ) #NEWLINE# operation = self . stack . last ( ) [ 1 ] #NEWLINE# operand = self . stack . resolve ( ) #NEWLINE# if ( operation == '+' ) : #NEWLINE# #INDENT# address += operand [ 0 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( operation == '-' ) : #NEWLINE# #INDENT# address -= operand [ 0 ] #NEWLINE# #UNINDENT# #UNINDENT# game += address . to_asm ( ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( len ( self . stack . current ( ) ) == 3 ) and isinstance ( self . stack . current ( ) [ 0 ] , int ) and isinstance ( self . stack . current ( ) [ 1 ] , str ) and isinstance ( self . stack . current ( ) [ 2 ] , NesRs ) ) : #NEWLINE# #INDENT# operand = self . stack . current ( ) [ 0 ] #NEWLINE# operation = self . stack . current ( ) [ 1 ] #NEWLINE# rs = self . stack . current ( ) [ 2 ] #NEWLINE# game += ( '  LDA %s\n' % rs . instance_name ) #NEWLINE# if ( operation == '+' ) : #NEWLINE# #INDENT# game += ( '  CLC\n  ADC #%02d\n' % operand ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( operation == '-' ) : #NEWLINE# #INDENT# game += ( '  SEC\n  SBC #%02d\n' % operand ) #NEWLINE# #UNINDENT# #UNINDENT# game += ( '  STA %s\n' % rs . instance_name )