previous
|
index
|
next
Game State Representation 3
Represent the game state
as a
procedure
that takes a pile number
x
and returns
n
if
x = 1
and
m
otherwise:
(lambda (x) (if (= x 1) n m))
Constructor:
(define make-game-state (lambda (n m)
(lambda (x) (if (= x 1) n m))
))
previous
|
index
|
next