#NEWLINE# def __moveLineOrCol( self , line , d ) : #NEWLINE# #INDENT# '\n        Move a line or column to a given direction (d)\n        ' #NEWLINE# nl = [ c for c in line if ( c != 0 ) ] #NEWLINE# if ( ( d == Board . UP ) or ( d == Board . LEFT ) ) : #NEWLINE# #INDENT# return ( nl + ( [ 0 ] * ( self . __size - len ( nl ) ) ) ) #NEWLINE# #UNINDENT# return ( ( [ 0 ] * ( self . __size - len ( nl ) ) ) + nl )