Skip to content

Instantly share code, notes, and snippets.

@waspyfaeleith
Last active April 21, 2017 09:37
Show Gist options
  • Save waspyfaeleith/0fab8ed9ad3a97d1ed7560f889f63bfb to your computer and use it in GitHub Desktop.
Save waspyfaeleith/0fab8ed9ad3a97d1ed7560f889f63bfb to your computer and use it in GitHub Desktop.

Lab - Rock Paper Scissors

Create a simple Android app to allow the user to play rock, paper, scissors.

They will enter their chosen move by clicking a button, the computer will randomly pick a move to play against them.

The player will see the both the computer's choice, and the result of the game on the screen.

You will need:
  • A button for each selection
  • A (tested) Java class for the game logic
  • A way to display what the computer's choice was, and the result (TextViews?)

Feel free to practice styling etc.

Extensions:

  • Add another activity which acts as a welcome page and explains the rules before the user picks their move.
  • Adapt your site to play Rock, Paper, Scissors, Lizard, Spock! (see: http://www.samkass.com/theories/RPSSL.html )
  • Keep a score of the number of wins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment