View.Set ("graphics:max,max") var rollcount : array 1 .. 6 of int := init (0, 0, 0, 0, 0, 0) var die : int var mx, my, mb : int var spot : int := 0 randomize drawline (1000, 0, 1000, maxy, black) drawfillbox (0,0,maxx,maxy,green) loop mousewhere (mx, my, mb) if mb = 1 then spot := mx div 80 end if if mb = 1 and spot <= 6 and my < 500 then rollcount (spot) += 1 end if delay (10) randint (die, 1, 6) rollcount (die) := rollcount (die) + 1 drawfillbox (0, die * 80,rollcount (die), die * 80 + 50, die) exit when rollcount (die) >= maxx end loop