6.2. Pointers to Stacks
-
I wanted to add support for such games as Der Katzenschwanz and Die Schlange
in which stacks could be initialized to several dozens of cards.
-
That made stacks way too long and caused every board to consume a lot of
memory.
-
Solution: keep one copy of each stack once in a dynamically allocated memory.
-
Each state contains an array of pointers to each of its stacks.
-
That made it possible to scale up to a million states and more.
Written by Shlomi Fish