Loïc Faugeron has continued his "Mars Rover" series of posts with this latest tutorial covering the functionality for the landing coordinates.
In this series we're going to build the software of a Mars Rover, according to the following specifications. It will allow us to practice the followings: Monolithic Repositories (MonoRepo), Command / Query Responsibility Segregation (CQRS), Event Sourcing (ES) and Test Driven Development (TDD).
Previously we've created a navigation package, and in it a LandRover class that validates input parameters for our first use case. [...] In this article we're going to refactor LandRover.
He starts off with the justification of why the
LandRover class needs to change and what kinds of new classes need to be made. He starts with the phpspec tests and builds out the
Orientation classes (with some basic functionality) to make the movement and direction of the rover more flexible and the meet the test requirements.