Public Test Board.testAdd


I don’t quite understand what testAdd tests…
It tries to add an unrotated J-Piece at (10, 10) of a (15, 24) empty board.
So the board coordinates (9, 10), (10, 10), (11, 9) and (11, 10) should be set to the J-Type.

Looking kind of like this:

But why should it assert false, this seems possible to add this piece, since it is not out of bounds?

  • Daniel

Take a close look at the test.
It adds the piece and then looks at whether it can be added.
But then there is already the previously added piece that blocks it.

Thank you. Makes perfect sense!
Already found the error :slight_smile: