I just encountered this error when playing Smash The Code:
invalid input. Expected ‘0 <= position < 5’ but found ‘position = 5’
my output was:
I thought the rules stated that
0 <= position < 6 ?
I know I still have bugs in my code, but that doesn’t look like one of mine, so I’m confused.
The “Output for one game turn” should make it clear. The rotation 0 means, that the second block is on the right side of the first block. So the position of the second block is on column 6. That is not possible.
The correct rule should be:
0 <= position < 6 for rotation 1 and 3
0 <= position < 5 for rotation 0
0 < position <6 for rotation 2
duh, of course!!!
thanks for reminding me and sorry for the trouble