Ambiguity: Which piece rotation to return from the factory

I noticed that the third assignment does not clarify how the pieces returned by the factory should be rotated (except for the I piece which can be seen in the left image).
Ambiguity exists for the following pieces:

██   ██  ██
██  ██    ██

From the comments in the available skeleton code it is not clear where the rotation pivot should be, and thus there are

  • 4 possible rotations for O
  • 2 possible rotations for S and Z

I have the feeling that the test prog2.tests.tetris.daily.BoardTest::testCompleteRowsIPiece is failing because of this:

java.lang.IllegalArgumentException: cannot add piece
        at prog2.tests.tetris.daily.BoardTest.testCompleteRowsIPiece(

I figured it to be the first column of the reference image in figure 1 (b):

1 Like

Indeed, this is correct.