Refactoring - can use the State pattern

Changing direction changes behaviour of the class, so I can use the
State pattern here to avoid those switch statements.

I *could* do the same with position, but that’s more awkward because it
depends on obstacles and I don’t think the complexity of returning
true/false is worth the removal of one switch statement (the one in
executeCommands)

All tests still pass \o/