Created
November 4, 2015 04:55
-
-
Save Cyndrome/60b13228feb766508286 to your computer and use it in GitHub Desktop.
Rock Paper Scissors game
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
you=choose("Make your choice","Rock","Paper","Scissors"); | |
comp=random(3); | |
if(comp==1){show("Rock");} | |
else if(comp==2){show("paper");} | |
else if(comp==3){show("Scissors");} | |
if(comp==1){ | |
if (you==1){show("Draw");} | |
else if(you==2){show("You win!");} | |
else if(you==3){show("Computer wins!");} | |
} else if(comp==2){ | |
if(you==1){show("Computer wins!");} | |
else if(you==2){show("Draw");} | |
else if(you==3){show("You win!");} | |
} else if(comp==3){ | |
if(you==1){show("You win!");} | |
else if(you==2){show("Computer wins!");} | |
else if(you==3){show("Draw");} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment