let’s imagine that I want to add a new piece2, the coordination are correct, but there is a conflict with another piece1 in one of the points, but this point have the value ‘false’ in piece1, so theoretically it’s empty.
in this case should I return true or false for canAddPiece?
In this case, canAddPiece should return true.
canAddPiece should only consider those coordinates of the board as occupied that actually have a part of a piece on them. If this weren’t the case, the “inside” of an L piece for example, could never be filled by another piece, which wouldn’t be very conducive to the gameplay at all.