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

Username:   Password: 
 RegisterRegister   
 help with slot machine
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Llama




PostPosted: Sat Jun 07, 2003 3:14 pm   Post subject: help with slot machine

When i get three slots the same i cannot give the person money. I can't think of a way to check if the three slots are the same and then give the person the right amount of money. Please help Crying or Very sad
Sponsor
Sponsor
Sponsor
sponsor
Llama




PostPosted: Sat Jun 07, 2003 3:15 pm   Post subject: (No subject)

here is how they show the slot pictures
code:

randint (s1, 1, 1)
    if s1 = 1 then
        Pic.ScreenLoad ("A:/treasure.bmp", 145, 155, 0)
    elsif s1 = 2 then
        Pic.ScreenLoad ("A:/crown.bmp", 145, 155, 0)
    elsif s1 = 3 then
        Pic.ScreenLoad ("A:/dragon.bmp", 145, 155, 0)
    elsif s1 = 4 then
        Pic.ScreenLoad ("A:/knight.bmp", 150, 155, 0)
    elsif s1 = 5 then
        Pic.ScreenLoad ("A:/sword.bmp", 155, 135, 0)
    end if

    %randomizing slot two
    delay (500)
    randint (s2, 1, 1)
    if s2 = 1 then
        Pic.ScreenLoad ("A:/treasure.bmp", 265, 155, 0)
    elsif s2 = 2 then
        Pic.ScreenLoad ("A:/crown.bmp", 265, 155, 0)
    elsif s2 = 3 then
        Pic.ScreenLoad ("A:/dragon.bmp", 265, 155, 0)
    elsif s2 = 4 then
        Pic.ScreenLoad ("A:/knight.bmp", 270, 155, 0)
    elsif s2 = 5 then
        Pic.ScreenLoad ("A:/sword.bmp", 275, 135, 0)
    end if

    %randomizing slot three
    delay (500)
    randint (s3, 1, 1)
    if s3 = 1 then
        Pic.ScreenLoad ("A:/treasure.bmp", 385, 155, 0)
    elsif s3 = 2 then
        Pic.ScreenLoad ("A:/crown.bmp", 385, 155, 0)
    elsif s3 = 3 then
        Pic.ScreenLoad ("A:/dragon.bmp", 385, 155, 0)
    elsif s3 = 4 then
        Pic.ScreenLoad ("A:/knight.bmp", 390, 155, 0)
    elsif s3 = 5 then
        Pic.ScreenLoad ("A:/sword.bmp", 395, 135, 0)
    end if
Llama




PostPosted: Sat Jun 07, 2003 3:56 pm   Post subject: (No subject)

dont post anything, i figured it out.
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  [ 3 Posts ]
Jump to:   


Style:  
Search: