View Single Post
  #1 (permalink)  
Old May 12th, 2008, 21:11
johnjo johnjo is offline
New Member
Join Date: May 2008
Location: brighton
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Need help with rockpaperscissors game

ok , so basically i need all the help i can get with an college assignment i got

it requires you place 3 images on the page. Computers hands, players hand and graphic indicating the winner.it must also must have Computer's Score,Player's Score,Button to play the game.

Pressing the button selects a random nr for each player. This number corresponds to a hand (scissors, paper or stone). A corresponding picture should automatically appear on the page for each player. According to the rules below a winner is selected and the graphic indicating who won should point to the winner (or both if its a draw). The winners score should be incremented and updated on screen. No points are awarded for a draw.

The game continues until one player reaches a score of 5, in which case they are alerted to the fact and the scores reset.

the only code i have to work with is : player1 = Math.round( Math.random() *2) ;

please help me
Reply With Quote