Computer Science Canada Random Dice |
Author: | Miko99 [ Tue Apr 08, 2003 9:35 am ] |
Post subject: | Random Dice |
var roll : int := Rand.Int (1,6) if roll=1 then drawfillbox (300,300,20,40,5) drawfilloval (200,210,20,20,6) elsif roll=2 then drawfillbox (300,300,20,40,5) drawfilloval (200,210,20,20,6) drawfilloval (250,260,20,20,6) elsif roll=3 then drawfillbox (300,300,20,40,5) drawfilloval (200,210,20,20,6) drawfilloval (250,260,20,20,6) drawfilloval (150,160,20,20,6) elsif roll=4 then drawfillbox (300,300,20,40,5) drawfilloval (200,210,20,20,6) drawfilloval (250,260,20,20,6) drawfilloval (150,160,20,20,6) drawfilloval (100,110,20,20,6) elsif roll=5 then drawfillbox (300,300,20,40,5) drawfilloval (200,210,20,20,6) drawfilloval (250,260,20,20,6) drawfilloval (150,160,20,20,6) drawfilloval (100,110,20,20,6) drawfilloval (60,70,20,20,6) else drawfillbox (300,300,20,40,5) drawfilloval (200,210,20,20,6) drawfilloval (250,260,20,20,6) drawfilloval (150,160,20,20,6) drawfilloval (100,110,20,20,6) drawfilloval (60,70,20,20,6) drawfilloval (60,250,20,20,6) end if is there an easier way of doing this? |
Author: | Asok [ Tue Apr 08, 2003 10:38 am ] |
Post subject: | |
you can use 6 pictures and use Pic.Draw |
Author: | Blade [ Tue Apr 08, 2003 11:33 am ] |
Post subject: | |
shouldnt this be in help? |
Author: | Asok [ Tue Apr 08, 2003 11:45 am ] |
Post subject: | |
yes it should but for some reason I don't have mod in this one, tony fix it ![]() |