Compare commits

..

No commits in common. "521e767741e367d655f9f1c5cdbf7898524c522c" and "7377f74d927c5999edbf00a300b9787d16fd7ec9" have entirely different histories.

2 changed files with 4 additions and 3 deletions

View File

@ -18,7 +18,7 @@ class GameMap:
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
player.record_mark(x, y)
else:

View File

@ -1,11 +1,12 @@
class Player():
def __init__(self, name):
def __init__(self, name, color):
self.name = name
self.color = color
self.markList = []
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):