Compute two-dimension coordinate from one-dimension list

def compute_coordinate(self, index):
        '''Compute two-dimension coordinate from one-dimension list'''
        j = index%self.board_size
        i = (index - j) // self.board_size
        return (i, j)