'Find the most efficient mask pattern.'

def best_mask_pattern(self):

    min_lost_point = 0
    pattern = 0
    for i in range(8):
        self.makeImpl(True, i)
        lost_point = util.lost_point(self.modules)
        if ((i == 0) or (min_lost_point > lost_point)):
            min_lost_point = lost_point
            pattern = i
    return pattern
