Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warehouse test - Part 3: Commands should be NE, SW etc. #40

Open
DisasterMan78 opened this issue Nov 4, 2019 · 1 comment
Open

Warehouse test - Part 3: Commands should be NE, SW etc. #40

DisasterMan78 opened this issue Nov 4, 2019 · 1 comment

Comments

@DisasterMan78
Copy link

Part three talks of issuing a command 'E N' which should be the same as issuing an east command then north, but this is what the code should already be doing, as the command lists are already space separated.
The aim should be to support the commands NE, NW, SW & NE.

The user may also wish to support the inverted commands EN, WN, WS & WE. It's arguably overkill, but personally I've tried to make the command string parser as forgiving as possible, knowing full well you should never trust user input, and being flexible reduces possibility of user friction.

[Note: Not a Guardian employee or contractor. Doing tests as part of contract application process]

@mxdvl
Copy link
Contributor

mxdvl commented Nov 12, 2021

Part three states (emphasis mine):

We have expanded the robot's grid system to include diagonal tracks. Modify the robot's movement so that it can take advantage of the new diagonals. We don't want to change all the movement programmes though so don't change the syntax of the commands we send.

So for example if the robot starts in the south-west corner of the warehouse then issuing the command "E N" should move the robot to the same place as if it moved east once and north once but it should only move once.

Moving the robot once is not the same as moving the robot twice, even if it ends in the same position. Just like "N E S W" isn’t the same as not moving at all.

This can also lead to interesting discussions around maintenance, so I would be tempted to leave this as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants