Cover by Conrad Barski M.D.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

Implementing Dice of Doom, Version 1

Let’s start coding this game in Lisp. As we discussed in the previous chapter, this game will contain both clean, functional code and dirty, imperative code. You’ll be able to tell in which category a block of code fits by the “clean/functional” or “dirty/imperative” icon next to it.

Defining Some Global Variables

First, we’ll create some global variables that define the basic parameters for our game:

 (defparameter *num-players* 2)
 (defparameter *max-dice* 3)
 (defparameter *board-size* 2)
 (defparameter *board-hexnum* ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required