draw die
Author |
Message |
ruff_riders91
|
Posted: Tue Dec 09, 2003 11:41 am Post subject: 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 |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Dan
|
Posted: Tue Dec 09, 2003 3:14 pm Post subject: (No subject) |
|
|
nice, whould be usfull for making one of thous die based games.
have some bits |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
|
PaddyLong
|
Posted: Tue Dec 09, 2003 4:15 pm Post subject: (No subject) |
|
|
turn it into a function and it'd be perfect |
|
|
|
|
|
Triple Five
|
Posted: Wed Dec 10, 2003 1:38 pm Post subject: (No subject) |
|
|
kool man! good for craps.... thanks for the programming im gonna see if i can make a craps game and post it |
|
|
|
|
|
|
|