Author | Scrub |
Submission date | 2017-12-04 16:24:52.632040 |
Rating | 3985 |
Matches played | 304 |
Win rate | 35.86 |
Use rpsrunner.py to play unranked matches on your computer.
import random
if input == "":
rockCount = paperCount = scissorsCount = 0
opponentMoves = 0
n = opponentMoves
elif input == "R":
rockCount += 1
opponentMoves += 1
elif input == "P":
paperCount += 1
opponentMoves += 1
elif input == "S":
scissorsCount += 1
opponentMoves += 1
if rockCount > paperCount and rockCount > scissorsCount:
output = "P"
elif paperCount > scissorsCount:
output = "S"
else:
output = "R"