2022-07-25 10:35:07 +00:00
|
|
|
class Player():
|
|
|
|
|
2022-08-15 04:25:25 +00:00
|
|
|
def __init__(self, name, personalScore=0):
|
2022-07-25 10:35:07 +00:00
|
|
|
self.name = name
|
|
|
|
self.markList = []
|
2022-08-15 04:25:25 +00:00
|
|
|
self.personalScore = personalScore
|
2022-07-25 10:35:07 +00:00
|
|
|
|
|
|
|
def __str__(self):
|
2022-07-25 13:53:56 +00:00
|
|
|
return "Player " + self.name + ': ' + "\n " + str(self.markList)
|
2022-07-25 10:35:07 +00:00
|
|
|
|
|
|
|
|
2022-08-07 06:26:57 +00:00
|
|
|
def get_markList(self):
|
|
|
|
return self.markList
|
|
|
|
|
|
|
|
|
2022-07-25 14:47:19 +00:00
|
|
|
def get_name(self):
|
|
|
|
return self.name
|
|
|
|
|
|
|
|
|
2022-07-25 15:39:12 +00:00
|
|
|
def add_mark(self, x, y):
|
2022-08-07 06:26:57 +00:00
|
|
|
self.markList.append((x, y))
|
2022-08-15 04:25:25 +00:00
|
|
|
self.personalScore += 10
|
2022-08-07 06:26:57 +00:00
|
|
|
|
|
|
|
def clear_mark_list():
|
|
|
|
self.markList = []
|