Moves Part 3
Subscribe to a paid plan to get instant access to this course.
 Video time: 13m30s

Moves Part 3

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.

Code is available: lispcast/solitaire

Code for this particular lesson is available at the solitaire-7 tag .

You can checkout the code in your local repo with this command:

$CMD git clone
$CMD cd solitaire 
$CMD git checkout -f solitaire-7          

Data Modeling in Clojure

0 / 9
Introduction 7 min
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
Next lesson:

Dealing a Game

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.