Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Random Dice
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Miko99




PostPosted: 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?
Sponsor
Sponsor
Sponsor
sponsor
Asok




PostPosted: Tue Apr 08, 2003 10:38 am   Post subject: (No subject)

you can use 6 pictures and use Pic.Draw
Blade




PostPosted: Tue Apr 08, 2003 11:33 am   Post subject: (No subject)

shouldnt this be in help?
Asok




PostPosted: Tue Apr 08, 2003 11:45 am   Post subject: (No subject)

yes it should but for some reason I don't have mod in this one, tony fix it Laughing
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: