HW6-rec. Can spaceships rotate to 90 degrees?

ArsenRB (240 points)
1 2 3
asked Jan 18 in HW6 by ArsenRB (240 points)
My program for this hw  handles only 4 out of 10 tests. So I focused on one particular situation when my program returns different result:

AssertionError: Lists differ: [True, False, False, False, True, True, False, True, True, False] != [True, True, False, False, True, True, False, True, True, False]

As you can see here only one element differs. So by debugging particulary this case, I found out that the second spaceship can fit to the city if only rotates to 90 degrees. So I redesigned my prgm to handle the case and.... it did mot work!

So, 2 things might be happening here:

1. I did a mistake while debugging and spaceships can't rotate.

2. It can, but my prgrm doesn't work

Help me, so I don't waste time focusing on both cases

2 Answers

GabrielAlexandru (7760 points)
2 4 29
answered Jan 18 by GabrielAlexandru (7,760 points)
Theoretically the spaceships don’t have to rotate in order to fit between buildings. You probably have a bug in your code.

I had the same problem when checking if a spaceship’s pattern matched something from the given image.
andrea.sterbini (172780 points)
514 935 1789
answered Jan 18 by andrea.sterbini (172,780 points)
No rotation allowed