MCPcopy Create free account
hub / github.com/geekcomputers/Python / judge

Function judge

stone_paper_scissor/utils.py:12–22  ·  view source on GitHub ↗
(player, computer)

Source from the content-addressed store, hash-verified

10
11
12def judge(player, computer):
13 if player == computer:
14 return "Draw"
15 elif player == 0 and computer == 1:
16 return "Lose"
17 elif player == 1 and computer == 2:
18 return "Lose"
19 elif player == 2 and computer == 0:
20 return "Lose"
21 else:
22 return "Win"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected