Skip to content

Commit ad6187c

Browse files
author
gsp
committed
Add comment to function
1 parent 8062ddb commit ad6187c

File tree

1 file changed

+3
-0
lines changed
  • days/13-15-text-games/rock_scissors_paper

1 file changed

+3
-0
lines changed

days/13-15-text-games/rock_scissors_paper/rps.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ def __init__(self, roll_name=''):
99
self.roll_name = roll_name.lower()
1010

1111
def win(self):
12+
"""
13+
:return: string of the roll defeated by a given key. i.e rock defeats scissors, so we return scissors for key = rock
14+
"""
1215
d = dict(rock='scissors', scissors='paper', paper='rock')
1316
return d[self.roll_name]
1417

0 commit comments

Comments
 (0)