[2Ed] Chapter 32: Prototype 4: Prospector Solitaire

In this chapter, you make your first digital card game. The game you create is a version of the popular Tri-Peaks Solitaire game that has been updated for the digital age.

This chapter includes several new techniques, including using XML configuration files, designing for mobile devices, and your first look at the 2D sprite tools that are included in Unity 4.3 and above.

By the end of the chapter, you’ll have not only a working card game but also a great framework for future card games you wish to create.

Kindle Edition Typo

  • On page 686 of the Kindle edition of the book, the Debug.LogError() line of the try/catch statement is tabbed incorrectly and missing an open parenthesis (the print edition has inconsistent bolding, but the code is correct). This is what it should look like:

    static public void EVENT(eScoreEvent evt) {
      try {  // try-catch stops an error from breaking your program
      } catch (System.NullReferenceException nre) {
        Debug.LogError("ScoreManager.EVENT() called while S=null.\n"+nre);


Starter Package

Tutorial Files