aweisser / ev3

MIT License
0 stars 1 forks source link

Make a solid border a precondition for a valid environmental map #3

Open aweisser opened 7 years ago

aweisser commented 7 years ago

As @irgndsondepp stated the out of bounds checks previously worked by accident because there is always a solid wall in every direction.

We should make a solid border (without gaps) a precondition for a valid environmental map.

rluetzner commented 7 years ago

Do you suggest to check every environmental map, or would you rather just say everything outside the map array is solid?

What I meant by my comment was that in the test instead of the robot starting in front of a wall, the robot was already inside the wall and tried moving out of the array. So it still couldn't move but the initial position was invalid.

I like the way maps are created and displayed in unit tests and to keep it humanly readable I second adding a check for solid boundaries.

I also added #4 concerning the robot's starting position.