Python Forum
[PyGame] Rock,paper,scissors Game(beginner)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGame] Rock,paper,scissors Game(beginner)
#9
The indentation you posted is off. Make sure all the elifs and the else line up with the original if. Also, your parentheses are wrong for the raw_input. The % player1 should be inside the parentheses for the raw_input.

Note that even with the variable problem that sparkz pointed out, you are not checking all the possibilities. There are six ways for a win to happen, and you only test for five. Also, you are assuming that if there's no win, someone entered and invalid play. You need to check to see if there was a tie before you do that.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
Rock,paper,scissors Game(beginner) - by r0d - Sep-28-2017, 09:19 PM
RE: Rock,paper,scissors Game(beginner) - by nilamo - Sep-28-2017, 09:20 PM
RE: Rock,paper,scissors Game(beginner) - by r0d - Sep-28-2017, 09:25 PM
RE: Rock,paper,scissors Game(beginner) - by nilamo - Sep-28-2017, 09:27 PM
RE: Rock,paper,scissors Game(beginner) - by r0d - Sep-28-2017, 09:39 PM
RE: Rock,paper,scissors Game(beginner) - by nilamo - Sep-28-2017, 11:03 PM
RE: Rock,paper,scissors Game(beginner) - by ichabod801 - Sep-29-2017, 01:03 AM
RE: Rock,paper,scissors Game(beginner) - by r0d - Sep-29-2017, 11:45 PM
RE: Rock,paper,scissors Game(beginner) - by r0d - Jan-16-2018, 08:01 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Rock/Paper/Scissors Game 1 abscorpy 6 3,949 Dec-01-2020, 10:08 PM
Last Post: metulburr
  randomization code in rock, paper, scissors cel 4 2,784 May-28-2020, 08:48 PM
Last Post: cel
  rock paper scissors game abscorpy 8 4,730 Feb-14-2019, 07:20 PM
Last Post: abscorpy
  Rock Paper Scissors Game, I need help. extraguac 2 2,623 Feb-14-2019, 04:34 AM
Last Post: extraguac

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020