The next lesson in the Solitaire series is ready. We will continue the exploration of moves. Moves are more complicated than what we’ve done before, so we’ll have to split it into different parts.
In this second part, we refactor the representation of moves until we represent it completely as data. This is called data-driven programming and it has a lot of advantages.
Code is available. The git tag to checkout is solitaire-7. Just execute the following at the command line:
git checkout solitaire-7
Rework the tests you wrote in the exercises from the last 2 lessons to use the new data formats for transfer and flip.
|Card Representations free||14 min|
|Card functional abstraction||14 min|
|Modeling Games||16 min|
|Moves Part 1||11 min|
|Moves Part 2||16 min|
|Moves Part 3||14 min|
|Dealing a Game||15 min|
|Validating moves||4 min|
In this lesson we develop a function that returns a new, dealt game. This lesson includes a video screencast and a git repo. The video is 16 minutes long.