CastleLab / COMP3021-2021Fall-PA1-Student-Version

HKUST - COMP3021 - 2021Fall - Programming Assignment 1 - Student Version.
0 stars 2 forks source link

Test cases include gems not reachable #8

Closed VincentLam386 closed 3 years ago

VincentLam386 commented 3 years ago

When I tried to run the test codes provided to us, some of them failed because the gems are not reachable according to my implementation. So I check some of the test codes, for example the GameBoard test shown below. Screenshot 2021-09-10 235832 The gameboard imply by this should be like this: @ * ***

However, considering the possible movement of the player, it should never be able to reach the center gem (i.e. cells[1][1]) because there are no stop cell from preventing player to slide directly to the wall, so not all gems are reachable in this case.

Since this problem prevent some tests from passing, may I know how I can deal with it? Thank you!

VincentLam386 commented 3 years ago

As a supplement, the reason why not all gems are reachable stop me from passing the test is that, an IllegalArgumentException was thrown when the GameBoard instance was created as specified in the Map Specification in the README. Therefore, it could not go forward and run the assertEqual(...).

Derppening commented 3 years ago

This issue has been discussed in #4, and an updated set of test cases have been provided.

Please refer to the Skeleton Code Updates section of the README for more information.

VincentLam386 commented 3 years ago

Oh sorry, I did not aware of it. Thank you for reminding.