Skip to content

Instantly share code, notes, and snippets.

@Cyndrome
Created November 4, 2015 04:55
Show Gist options
  • Save Cyndrome/60b13228feb766508286 to your computer and use it in GitHub Desktop.
Save Cyndrome/60b13228feb766508286 to your computer and use it in GitHub Desktop.
Rock Paper Scissors game
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