priyaaank / MarsRover

Mars Rover problem solution to demonstrate OO concepts in action
Other
98 stars 55 forks source link

Boundary detection bug #4

Open giovanichaves opened 6 years ago

giovanichaves commented 6 years ago

Hey, I just noticed that maybe you got a bug here. The condition should be only ">" instead of ">=", because if your rover is sitting over the boundary, it'll return true for outside the boundary and true for inside as well. Do you agree?

https://github.com/priyaaank/MarsRover/blob/4aec37634eac37b5a568c32a9aa1273aaa3f80e8/src/com/thoughtworks/rover/universe/Coordinates.java#L35 https://github.com/priyaaank/MarsRover/blob/4aec37634eac37b5a568c32a9aa1273aaa3f80e8/src/com/thoughtworks/rover/universe/Coordinates.java#L39

priyaaank commented 6 years ago

Hi,

I am sorry to be responding so late on this issue. Do you think it is possible to write a test and demonstrate the issue here? That would make for a easier identification and fix.

Cheers