Debugged pieceAt() and putPieceAt()

Added the boundaries for x and y