@@ -18,22 +18,28 @@ def __init__(self, input_queue, output_queue, screen):
18
18
19
19
def run (self ):
20
20
# Create generator here
21
- width = 16
22
- height = 6
23
- sleep_time = 0.075
21
+ # width = 16
22
+ # height = 6
24
23
25
- modules = [j for sub in self .screen .board_objects for j in sub ]
24
+ # modules = [j for sub in self.screen.board_objects for j in sub]
25
+ # while True:
26
+ # for mod in modules:
27
+ # x1 = random.randint(0, width - 1)
28
+ # y1 = random.randint(0, height - 1)
29
+ # x2 = random.randint(0, width - 1)
30
+ # y2 = random.randint(0, height - 1)
31
+ # letter1 = chr(random.randint(33, 126))
32
+ # # letter2 = chr(random.randint(33, 126))
33
+ # mod.letter2(x1, y1, letter1)
34
+ # mod.letter2(x2, y2, " ")
35
+ # mod.flush()
36
+ # yield
26
37
while True :
27
- for mod in modules :
28
- x1 = random .randint (0 , width - 1 )
29
- y1 = random .randint (0 , height - 1 )
30
- x2 = random .randint (0 , width - 1 )
31
- y2 = random .randint (0 , height - 1 )
32
- letter1 = chr (random .randint (33 , 126 ))
33
- # letter2 = chr(random.randint(33, 126))
34
- mod .letter2 (x1 , y1 , letter1 )
35
- mod .letter2 (x2 , y2 , " " )
36
- mod .flush ()
38
+ for _ in range (4 ):
39
+ self .screen .draw_text (random .randint (0 ,self .screen .x_width - 1 ),random .randint (0 ,self .screen .y_height - 2 ),chr (random .randint (33 , 126 )))
40
+ for _ in range (4 ):
41
+ self .screen .draw_text (random .randint (0 ,self .screen .x_width - 1 ),random .randint (0 ,self .screen .y_height - 2 )," " )
42
+ self .screen .push ()
37
43
yield
38
44
39
45
def stop (self ):
0 commit comments