예제 #1
0
def shuffle(seq):
    for i in range(len(seq) - 1, 0, -1):
        j = rng() % (i + 1)
        seq[i], seq[j] = seq[j], seq[i]
예제 #2
0
 def mark_sensitive(self, from_y, to_y):
     wx = self.WIDTH-4       # avoid scroll bar
     for y in range(from_y, to_y):
         ln = max(2, ckcc.rng() % 32)
         self.dis.line(wx-ln, y, wx, y, 1)