from random import * from polycalc import * screen_w, screen_h, has_color, font_w, font_h, get_pixel, set_pixel, fill_rect, draw_string, show_screen, get_key = get_infos(("w","h","hc","fwn","fh","gp","sp","fr","ds","sh","gk")) def mat(n=42): color_back = has_color and (0,0,0) or (255,255,255) seed(n) fill_rect(0, 0, screen_w, screen_h, color_back) for l in range(screen_h//font_h): draw_string(''.join(chr(48+randint(0,9)) for i in range(screen_w//font_w)), 0, font_h*l, (0,255,0), color_back) show_screen() while not get_key(): c = randint(0, screen_w-1) d = int(screen_h // 5.5) for l in range(screen_h): set_pixel(c, screen_h-1-l, l > screen_h-1-d and color_back or get_pixel(c, screen_h-1-d-l)) show_screen() mat()