+ Reply to Thread
Results 1 to 1 of 1
  1. #1
    Join Date
    Apr 2008
    Location
    ATX
    Posts
    1,545
    Points
    1,589,794.65
    Rep Power
    219

    Default [Calc] Rock Paper Scissors

    This is a calculator version of the classic game. There's a one and two player mode, although i doubt you'll ever use the two player mode. I don't. See what you can get as a high score. Mine's 9 lol it's hard. Take a look at the program, see what you can't figure out and ask me.
    REMINDER: DO NOT COPY AND PASTE THE SOURCE INTO A NEW PROGRAM IT'S MERELY FOR REFERENCE SOME SYMBOLS ARE INCOMPATIBLE WITH BROWSERS. DOWNLOAD THE PROGRAM AT THE BOTTOM OF THE POST.
    Code:
    :"Rock, Paper, Scissors
    ClrDraw
    CoordOff
    AxesOff
    ú50üXmin
    50üXmax
    ú50üYmin
    50üYmax
    50üA
    Lbl SA
    Horizontal A
    Horizontal úA
    Vertical A
    Vertical úA
    A-1üA
    If A=25
    Then
    Goto SB
    End
    Goto SA
    Lbl SB
    Text(16,28,"Rock")
    For(P,1,500)
    End
    Text(22,30,"Paper")
    For(P,1,500)
    End
    Text(28,32,"Scissors")
    For(P,1,500)
    End
    Text(34,34,"By:")
    For(P,1,500)
    End
    Text(40,36,"WMD54")
    For(P,1,1250)
    End
    SetUpEditor áRPS
    Archive áRPS
    UnArchive áRPS
    CoordOn
    AxesOn
    ú10üXmin
    10üXmax
    ú10üYmin
    10üYmax
    0üS
    0üQ
    Lbl S
    ClrHome
    Menu("    Welcome.    ","1 Player",1,"2 Player",2,"Instructions",I,"Quit",QU
    Lbl 1
    If dim(áRPS)=0
    Then
    7üáRPS(1)
    End
    Lbl 3
    Output(1,1,"1) Rock")
    Output(2,1,"2) Paper")
    Output(3,1,"3) Scissors")
    Output(4,1,"Your score:")
    Output(4,13,S)
    Output(5,1,"High score:")
    Output(5,13,áRPS(1))
    0üA
    While A=0
    getKeyüA
    If A=92
    Then
    1üC
    Goto 4
    End
    If A=93
    Then
    2üC
    Goto 4
    End
    If A=94
    Then
    3üC
    Goto 4
    End
    Goto 3
    Lbl 4
    ClrHome
    randInt(1,3)üR
    If C=1 and R=1
    Then
    Disp "You: Rock"
    For(P,1,500)
    End
    Output(2,1,"Jeremy: Rock"
    For(P,1,500)
    End
    Output(4,1,"      TIE!      "
    For(P,1,500)
    End
    ClrHome
    Goto 1
    End
    If C=2 and R=2
    Then
    Disp "You: Paper"
    For(P,1,500)
    End
    Output(2,1,"Jeremy: Paper"
    For(P,1,500)
    End
    Output(4,1,"      TIE!      "
    For(P,1,500)
    End
    ClrHome
    Goto 1
    End
    If C=3 and R=3
    Then
    Disp "You: Scissors"
    For(P,1,500)
    End
    Output(2,1,"Jeremy: Scissors"
    For(P,1,500)
    End
    Output(4,1,"      TIE!      "
    For(P,1,500)
    End
    ClrHome
    Goto 1
    End
    If C=1
    Then
    Output(1,1,"You: Rock")
    Goto 5
    End
    If C=2
    Then
    Output(1,1,"You: Paper")
    Goto 5
    End
    If C=3
    Then
    Output(1,1,"You: Scissors")
    Goto 5
    End
    Lbl 5
    For(P,1,500)
    End
    If R=1
    Then
    Output(2,1,"Jeremy: Rock")
    Goto 6
    End
    If R=2
    Then
    Output(2,1,"Jeremy: Paper")
    Goto 6
    End
    If R=3
    Then
    Output(2,1,"Jeremy: Scissors")
    Goto 6
    End
    Lbl 6
    For(P,1,500)
    End
    If C=1 and R=2 or C=2 and R=3 or C=3 and R=1
    Then
    Output(4,1,"You lose.")
    For(P,1,500)
    End
    If SùáRPS(1)
    Then
    ClrHome
    Disp "New high score!"
    For(P,1,1000)
    End
    ClrHome
    0üS
    Goto 7
    End
    0üS
    Goto 7
    End
    Output(4,1,"You win.")
    1+SüS
    If SùáRPS(1)
    Then
    SüáRPS(1)
    For(P,1,500)
    End
    ClrHome
    Goto 1
    End
    For(P,1,500)
    End
    ClrHome
    Goto 1
    Lbl 7
    ClrHome
    Menu("     Again?     ","Yes",1,"No",QU)
    Lbl 2
    ClrHome
    Disp "Player 1, it's","your turn now."
    For(P,1,1500)
    End
    ClrHome
    Lbl 10
    Output(1,1,"1) Rock")
    Output(2,1,"2) Paper")
    Output(3,1,"3) Scissors")
    0üA
    While A=0
    getKeyüA
    If A=92
    Then
    1üC
    Goto 9
    End
    If A=93
    Then
    2üC
    Goto 9
    End
    If A=94
    Then
    3üC
    Goto 9
    End
    Goto 10
    Lbl 9
    ClrHome
    Disp "Okay, Player 2,","it's your turn","now."
    For(P,1,1500)
    End
    ClrHome
    Lbl 11
    Output(1,1,"1) Rock")
    Output(2,1,"2) Paper")
    Output(3,1,"3) Scissors")
    0üA
    While A=0
    getKeyüA
    If A=92
    Then
    1üT
    Goto 12
    End
    If A=93
    Then
    2üT
    Goto 12
    End
    If A=94
    Then
    3üT
    Goto 12
    End
    Goto 11
    Lbl 12
    If C=1 and T=1
    Then
    ClrHome
    Disp "Player 1: Rock"
    For(P,1,500)
    End
    Output(2,1,"Player 2: Rock")
    For(P,1,500)
    End
    Output(4,1,"      TIE!      ")
    For(P,1,500)
    End
    ClrHome
    Goto 2
    End
    If C=2 and T=2
    Then
    ClrHome
    Disp "Player 1: Paper"
    For(P,1,500)
    End
    Output(2,1,"Player 2: Paper")
    For(P,1,500)
    End
    Output(4,1,"      TIE!      ")
    For(P,1,500)
    End
    ClrHome
    Goto 2
    End
    If C=3 and T=3
    Then
    ClrHome
    Disp "Player 1: ","Scissors"
    For(P,1,500)
    End
    Output(3,1,"Player 2:")
    Output(4,1,"Scissors")
    For(P,1,500)
    End
    Output(6,1,"      TIE!      ")
    For(P,1,500)
    End
    ClrHome
    Goto 2
    End
    If C=1
    Then
    ClrHome
    Disp "Player 1: Rock"
    For(P,1,500)
    End
    Goto SF
    End
    If C=2
    Then
    ClrHome
    Disp "Player 1: Paper"
    For(P,1,500)
    End
    Goto SF
    End
    If C=3
    Then
    ClrHome
    Disp "Player 1:","Scissors"
    For(P,1,500)
    End
    Goto SF
    End
    Lbl SF
    If C=3 and T=1
    Then
    Output(3,1,"Player 2: Rock")
    For(P,1,500)
    End
    Goto TF
    End
    If Cø3 and T=1
    Then
    Output(2,1,"Player 2: Rock")
    For(P,1,500)
    End
    Goto TF
    End
    If C=3 and T=2
    Then
    Output(3,1,"Player 2: Paper")
    For(P,1,500)
    End
    Goto TF
    End
    If Cø3 and T=2
    Then
    Output(2,1,"Player 2: Paper")
    For(P,1,500)
    End
    Goto TF
    End
    If C=3 and T=3
    Then
    Output(3,1,"Player 2:")
    Output(4,1,"Scissors")
    For(P,1,500)
    End
    Goto TF
    End
    If Cø3 and T=3
    Then
    Output(2,1,"Player 2:")
    Output(3,1,"Scissors")
    For(P,1,500)
    End
    Goto TF
    End
    Lbl TF
    If C=1 and T=2
    Then
    Output(4,1,"Player 2, you")
    Output(5,1,"win.")
    For(P,1,500)
    End
    ClrHome
    Goto 13
    End
    If C=1 and T=3
    Then
    Output(5,1,"Player 1, you")
    Output(6,1,"win.")
    For(P,1,500)
    End
    ClrHome
    Goto 13
    End
    If C=2 and T=1
    Then
    Output(4,1,"Player 1, you")
    Output(5,1,"win.")
    For(P,1,500)
    End
    ClrHome
    Goto 13
    End
    If C=2 and T=3
    Then
    Output(4,1,"Player 2, you")
    Output(5,1,"win.")
    For(P,1,500)
    End
    ClrHome
    Goto 13
    End
    If C=3 and T=1
    Then
    Output(5,1,"Player 2, you")
    Output(6,1,"win.")
    For(P,1,500)
    End
    ClrHome
    Goto 13
    End
    If C=3 and T=2
    Then
    Output(5,1,"Player 1, you")
    Output(6,1,"win.")
    For(P,1,500)
    End
    ClrHome
    Goto 13
    End
    Lbl 13
    Menu("     Again?     ","Yes",2,"No",QU)
    Lbl I
    ClrHome
    Disp "Are you ♥♥♥♥ing","kidding me? You","need some damn","instructions on","this game?","That's..."
    For(P,1,2500)
    End
    Disp "That's sad."
    For(P,1,1000)
    End
    ClrHome
    Output(4,1,"      Sad.      ")
    For(P,1,1500)
    End
    ClrHome
    Goto S
    Lbl QU
    ClrHome
    Stop
    btw, yes, Jeremy is me. It might even be said that I am Jeremy. (let's see how many people figure that one out...)
    Last edited by WMD54; 10-12-2008 at 11:38 PM.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts