diff --git a/chess.py b/chess.py index a65cdd7..d17b385 100644 --- a/chess.py +++ b/chess.py @@ -103,10 +103,13 @@ class Piece: def __repr__(self): if None in (self.piece, self.color): - return None + return "" name = self.color.upper() + " CHESS " + self.piece.upper() return lookup(name) + def __str__(self): + return repr(self) + def __eq__(self, other): if other == None: return None in (self.color, self.piece) @@ -426,4 +429,3 @@ def test(): continue print(game) -test()