Create a mars rover at origin point and facing to north
Move mars rover one step fordward
Move mars rover one step backward
Move mars rover three steps fordward and one backward
First refactoring
Move mars rover three steps fordward and one backward when facing east
Second refactoring
Move mars rover turn right three steps and one left when facing east
Move mars rover two steps fordward, turn right and two steps fordward again facing north