I'm creating a chess game in which I decided to implement two class, the piece class an abstract class extends to various abstract operations(Pawn, King, Queen, Rook, Knight, Bishop), and every piece will be placed on a spot. The spot class represents one block of the 8x8 grid and an optional piece. In my spot class I take in an instance of the piece class in the constructor but I am getting an error "No statement effect errors". I am not sure why?
class Spot:
def __init__(self, x, y,Piece piece):
self.x = x
self.y = y
self.piece = piece
class Piece:
killed = False
white = False
def __init__(self, white,killed):
self.white = white
self.killed = killed
def iswhite(self):
return self.white == True
def iskilled(self):
return self.killed == True