Roblox Central

Discussion for all things Roblox. (roblox.com)

Welcome to the new forum! Any suggestions you have are greatly appreciated.
WARNING: Before referring anyone to this website, Please read this topic

    RandomRandom

    Share
    avatar
    Meelo
    Admin

    Posts : 217
    Join date : 2009-06-19

    RandomRandom

    Post by Meelo on Sat Sep 05, 2009 6:01 pm

    <html>
    <head>
    <script type="text/javascript">
    var suits;
    var values;
    var cards;
    function setup(){
    suits = new Array("Club","Heart","Diamond","Spade","Special");
    values = new Array("2","3","4","5","6","7","8","9","10","Jack","Queen","King","Ace","Wizard","Jester");
    cards = new Array()
    for(x in suits){
    if(x == 4){ break; }
    for(y in values){
    if(y == 13){ break; }
    cards[cards.length] = new Array(x,y,true)
    }
    }
    cards[cards.length] = new Array(4,13,true);
    cards[cards.length] = new Array(4,13,true);
    cards[cards.length] = new Array(4,13,true);
    cards[cards.length] = new Array(4,13,true);
    cards[cards.length] = new Array(4,14,true);
    cards[cards.length] = new Array(4,14,true);
    cards[cards.length] = new Array(4,14,true);
    cards[cards.length] = new Array(4,14,true);
    }
    function Delete(){
    var suit = -1;
    for(i in suits){
    if(suits[i] == document.getElementById('Suit').value){
    suit = i;
    break;
    }
    }
    var value = -1;
    for(i in values){
    if(values[i] == document.getElementById('Value').value){
    value = i;
    break;
    }
    }
    for(i in cards){
    if(cards[i][0] == suit){
    if(cards[i][1] == value){
    if(cards[i][2]){
    cards[i][2] = false;
    break;
    }
    }
    }
    }
    var txt = "";
    for(x in cards){
    if(cards[x][2]){
    txt = txt + suits[cards[x][0]] + ", " + values[cards[x][1]] + "<br>";
    }
    }
    document.getElementById('stuff').innerHTML = txt;
    }
    </script>
    </head>
    <body onLoad="setup()">

    <input type="text" id="Suit" value="Suit" />
    <input type="text" id="Value" value="value" />
    <input type="button" onclick="Delete()" value= "Play" />
    <div id="stuff"></div>

    </body>
    </html>


    _________________
    Banhappy? BANHAPPY? I'LL SHOW YOU BANHAPPY!

    Jfeather
    Admin

    Posts : 232
    Join date : 2009-06-18
    Location : This Forum. Duh.

    Re: RandomRandom

    Post by Jfeather on Sun Sep 06, 2009 7:35 pm

    Wait, I don't think HTML is enabled. I'll have to find that somewhere.


    _________________


    Remember to link your RC profile to your Roblox profile. You can do this in the "Information" section of your profile.
    To find someone's Roblox profile, it is located under their "Contact" tab on their RC profile.
    avatar
    BlueTaslem
    Learning the Ropes
    Learning the Ropes

    Posts : 32
    Join date : 2009-09-03

    Re: RandomRandom

    Post by BlueTaslem on Mon Sep 07, 2009 11:36 am

    Whats this?
    avatar
    Earth
    Admin

    Posts : 402
    Join date : 2009-06-18
    Location : According to my IP address: Topeka, Kansas.

    Re: RandomRandom

    Post by Earth on Tue Sep 08, 2009 1:07 pm

    Cards!

    Yaaayyy

    (Can we do something with them(Wizards?))

    Sponsored content

    Re: RandomRandom

    Post by Sponsored content


      Current date/time is Mon Nov 12, 2018 4:20 pm