Added score counting
It makes no sense to keep one score for everyone, in GameMap. A design flaw.
This commit is contained in:
parent
d329c0f7ab
commit
54a0f42137
@ -1,8 +1,9 @@
|
||||
class Player():
|
||||
|
||||
def __init__(self, name):
|
||||
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)
|
||||
@ -18,7 +19,7 @@ class Player():
|
||||
|
||||
def add_mark(self, x, y):
|
||||
self.markList.append((x, y))
|
||||
|
||||
self.personalScore += 10
|
||||
|
||||
def clear_mark_list():
|
||||
self.markList = []
|
Loading…
Reference in New Issue
Block a user