Closed kyfex-uwu closed 10 months ago
Good job submitting a pull request!
This issue has already been addressed in the repo. See commit c74ccde.
If you will, here is some feedback for you.
While you did correctly implement a solution to the problem, the problem is better handled by converting the generic Collection
into a Set
. Set
equality is defined has having exactly the same items without respecting their order. Leveraging the built-in features of the language and it's data structures renders a cleaner final solution.
Ahh, thanks! I talked to some TAs about this problem after I made this request, and they helped me see that solution as well. While I knew I needed set equality, I didn't realize there was an easier way to do it 😅
I believe this has already been resolved.
The previous
Assertions.assertEquals
required the order of the moves to be the same, not just thatvalidMoves
andpieceMoves
contained all the same moves. This helper method changes thatThe error message sent to the user should be similar, since it uses the same AssertionError as the previous code.