tic-far-toe/Player.py
oto 54a0f42137 Added score counting
It makes no sense to keep one score for everyone, in GameMap. A design flaw.
2022-08-15 07:25:25 +03:00

25 lines
561 B
Python

class Player():
def __init__(self, name, personalScore=0):
self.name = name
self.markList = []
self.personalScore = personalScore
def __str__(self):
return "Player " + self.name + ': ' + "\n " + str(self.markList)
def get_markList(self):
return self.markList
def get_name(self):
return self.name
def add_mark(self, x, y):
self.markList.append((x, y))
self.personalScore += 10
def clear_mark_list():
self.markList = []