py/arena.py
def update_result_statistics(self):
        '''Count the game and update the result statistics in self.state'''

        self.game_count += 1 # Count the game

        # Get state key
        shorthand_color = 'W' if self.me==chess.WHITE else 'B' 

        if self.state['winner'] == self.me:
            # "I" win
            result = '%s_win' % shorthand_color 

        elif self.state['winner'] == (not self.me):
            # "I" lose
            result = '%s_lose' % shorthand_color

        else:
            # "I" drew
            result = '%s_draw' % shorthand_color

            # Make sure to log the reason for the draw!
            self.log_draw_reason()

        # Increment result counter
        self.state[result] += 1

        # Post the update of the counter
        self.post_state()
Count the game and update the result statistics in self.state
Count the game and update the result statistics in self.state
Count the game and update the result statistics in self . state
def update_result_statistics(self):
        self.game_count += 1 
        shorthand_color = 'W' if self.me==chess.WHITE else 'B' 
        if self.state['winner'] == self.me:
            result = '%s_win' % shorthand_color 
        elif self.state['winner'] == (not self.me):
            result = '%s_lose' % shorthand_color
        else:
            result = '%s_draw' % shorthand_color
            self.log_draw_reason()
        self.state[result] += 1
        self.post_state()
def update_result_statistics ( self ) : self . game_count += 1 shorthand_color = 'W' if self . me == chess . WHITE else 'B' if self . state [ 'winner' ] == self . me : result = '%s_win' % shorthand_color elif self . state [ 'winner' ] == ( not self . me ) : result = '%s_lose' % shorthand_color else : result = '%s_draw' % shorthand_color self . log_draw_reason ( ) self . state [ result ] += 1 self . post_state ( )
Count the game and update the result statistics in self.state
Count the game and update the result statistics in self . state
'''Count the game and update the result statistics in self.state''' # Count the game # Get state key # "I" win # "I" lose # "I" drew # Make sure to log the reason for the draw! # Increment result counter # Post the update of the counter
self