#NEWLINE# def print_game( game ) : #NEWLINE# #INDENT# '\n\tprint Game data and moves\n\t' #NEWLINE# game = ' ' . join ( game ) #NEWLINE# game = re . sub ( '\\d+\\.' , ' ' , game ) . strip ( ) #NEWLINE# moves = re . split ( '\\s+' , game ) #NEWLINE# board = chess . Bitboard ( ) #NEWLINE# end = moves [ ( - 1 ) ] #NEWLINE# moves = moves [ : ( - 1 ) ] #NEWLINE# after_str = str ( board ) #NEWLINE# for move in moves : #NEWLINE# #INDENT# mv = board . push_san ( move ) #NEWLINE# after_str = str ( move ) #NEWLINE# sys . stdout . write ( ( '%s\t%s\t%s\t%s\n' % ( after_str , board . is_game_over ( ) , board . is_checkmate ( ) , board . is_stalemate ( ) ) ) )