Skip to content

Instantly share code, notes, and snippets.

@mhriess
Created October 5, 2012 05:46
Show Gist options
  • Save mhriess/3838300 to your computer and use it in GitHub Desktop.
Save mhriess/3838300 to your computer and use it in GitHub Desktop.
Rock-Paper-Scissors Pseudocode

Script: ROCK - PAPER - SCISSOR Iteration One: COMPUTERS HANDSIGN

RETURN a random hand sign (Rock-Paper-Scissor)

Iteration Two: CHECK WHO WON

IF COMPUTERS HANDSIGN beats PLAYERS HANDSIGN RETURN "You loose" ELSIF PLAYERS HANDSIGN beats COMPUTERS HANDSIGN RETURN "You win" ELSE RETURN "Draw" ENDIF

Iteration Three: GET A HANDSIGN OF A PLAYER

GET a hand sign of a player IF it's one of the 3 possibilities CHECK WHO WON ELSE RETURN "This is not possible" ENDIF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment