Compare commits
No commits in common. "521e767741e367d655f9f1c5cdbf7898524c522c" and "7377f74d927c5999edbf00a300b9787d16fd7ec9" have entirely different histories.
521e767741
...
7377f74d92
@ -18,7 +18,7 @@ class GameMap:
|
|||||||
|
|
||||||
|
|
||||||
def add_player_mark(self, x, y, player):
|
def add_player_mark(self, x, y, player):
|
||||||
if (x <= self.max_size_x and y <= self.max_size_y) and (x >= 0 and y >= 0):
|
if x <= self.max_size_x and y <= self.max_size_y:
|
||||||
self.data[(x,y)] = player
|
self.data[(x,y)] = player
|
||||||
player.record_mark(x, y)
|
player.record_mark(x, y)
|
||||||
else:
|
else:
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
class Player():
|
class Player():
|
||||||
|
|
||||||
def __init__(self, name):
|
def __init__(self, name, color):
|
||||||
self.name = name
|
self.name = name
|
||||||
|
self.color = color
|
||||||
self.markList = []
|
self.markList = []
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "Player " + self.name + ': ' + "\n " + str(self.markList)
|
return "Player " + self.name + ': ' + "Color - " + self.color + "\n " + str(self.markList)
|
||||||
|
|
||||||
|
|
||||||
def record_mark(self, x, y):
|
def record_mark(self, x, y):
|
||||||
|
Loading…
Reference in New Issue
Block a user