
-----------------------------------
ruff_riders91
Tue Dec 09, 2003 11:41 am

draw die
-----------------------------------
setscreen ("graphics")
var x, y, x2, y2, h, die : int
loop
    randint (h, 10, maxy)
    randint (x, 0, maxx - h)
    randint (y, 0, maxy - h)
    randint (die, 1, 6)
    const size := h div 15
    const col := white
    drawfill (1, 1, black, black)
    drawfillbox (x, y, x + h, y + h, brightred)
    case die of
        label 1 :
            drawfilloval (x + h div 2, y + h div 2, size, size, col)
        label 2 :
            drawfilloval (x + h div 5, y + h div 5, size, size, col)
            drawfilloval (x + h div 5 * 4, y + h div 5 * 4, size, size, col)
        label 3 :
            drawfilloval (x + h div 2, y + h div 2, size, size, col)
            drawfilloval (x + h div 5, y + h div 5, size, size, col)
            drawfilloval (x + h div 5 * 4, y + h div 5 * 4, size, size, col)
        label 4 :
            drawfilloval (x + h div 5, y + h div 5, size, size, col)
            drawfilloval (x + h div 5 * 4, y + h div 5 * 4, size, size, col)
            drawfilloval (x + h div 5 * 4, y + h div 5, size, size, col)
            drawfilloval (x + h div 5, y + h div 5 * 4, size, size, col)
        label 5 :
            drawfilloval (x + h div 5, y + h div 5, size, size, col)
            drawfilloval (x + h div 5 * 4, y + h div 5 * 4, size, size, col)
            drawfilloval (x + h div 5 * 4, y + h div 5, size, size, col)
            drawfilloval (x + h div 5, y + h div 5 * 4, size, size, col)
            drawfilloval (x + h div 2, y + h div 2, size, size, col)
        label 6 :
            drawfilloval (x + h div 5, y + h div 5, size, size, col)
            drawfilloval (x + h div 5 * 4, y + h div 5 * 4, size, size, col)
            drawfilloval (x + h div 5 * 4, y + h div 5, size, size, col)
            drawfilloval (x + h div 5, y + h div 5 * 4, size, size, col)
            drawfilloval (x + h div 5, y + h div 2, size, size, col)
            drawfilloval (x + h div 5 * 4, y + h div 2, size, size, col)

    end case
    delay (200)
    cls
end loop

-----------------------------------
Dan
Tue Dec 09, 2003 3:14 pm


-----------------------------------
nice, whould be usfull for making one of thous die based games.

have some bits

-----------------------------------
PaddyLong
Tue Dec 09, 2003 4:15 pm


-----------------------------------
turn it into a function and it'd be perfect

-----------------------------------
Triple Five
Wed Dec 10, 2003 1:38 pm


-----------------------------------
kool :D  man! good for craps.... thanks for the programming im gonna see if i can make a craps game and post it
