Hello,

I know I have asked earlier but im still stuck on this one : https://github.com/exercism/problem-specifications/blob/master/exercises/robot-simulator/description.md

I tried with all double dispatch but that will be a lot of duplicate classes

The problem I cannot solve right is that a robot can move or turn. when a robot turns only the direction the robot is facing changes and the position not. when a robot moves the facing direction stays the same but the position changes. but the change is dependend on the facing. Also the new facing direction is dependend on the old facing direction/
How can I model this the best.

I already have a object Robot that contains the facing direction and the current position
or tried without it but then I use a lot of if then's


so itĀ  thereĀ  a better way to model this problem so it will be all nice and readable code.

Roelof

Reply via email to