forked from MicrosoftDocs/mslearn-python-oo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrock-paper-scissor-0.py
33 lines (29 loc) · 965 Bytes
/
rock-paper-scissor-0.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
class Participant:
def __init__(self, name):
self.name = name
self.points = 0
self.choice = ""
def choose(self):
self.choice = input("{name}, select rock, paper or scissor: ".format(name=self.name))
print("{name} selects {choice}".format(name=self.name, choice=self.choice))
class GameRound:
def __init__(self, p1, p2):
p1.choose()
p2.choose()
def compareChoices(self):
print("implement")
def awardPoints(self):
print("implement")
class Game:
def __init__(self):
self.endGame = False
self.participant = Participant("Spock")
self.secondParticipant = Participant("Kirk")
def start(self):
game_round = GameRound(self.participant, self.secondParticipant)
def checkEndCondition(self):
print("implement")
def determineWinner(self):
print("implement")
game = Game()
game.start()