All pastes #211824 Raw Edit

chris

public text v1 · immutable
#211824 ·published 2006-10-20 14:35 UTC
rendered paste body
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 (0, 500, maxx, 500, red)
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 (die * 80, 0, die * 80 + 50, rollcount (die), die)
    exit when rollcount (die) >= 500
end loop