(size-of-pile (make-game-state n m k) 1) ⇒ n (size-of-pile (make-game-state n m k) 2) ⇒ m (size-of-pile (make-game-state n m k) 3) ⇒ kFor the constructor, we can cons the third pile value onto what we already have from two-pile Nim:
(define make-game-state (lambda (n m k) (cons k (cons n m))))Can visualize this as either:
![]() | or | ![]() |