Game state is the value of all fields in all traits in all counters at any given time.
A move changes the game state by changing the value of a field.
It is useful to define the concept of stage. A stage is one or more moves that bring the
game from one meaningful state to a next meaningful state. An example is moving a stack of
counters. It consists of the individual moves of each counter but the next stage
is only meaningful when all counters have moved.
Moves are stored on a stack, the stageStack. Stages on the stack are separated by a special
"end" move.
In the figure below the stageStack is illustrated.

The black pointer is the stagePointer that points to the current stage. An undo will move the stagePointer down.
A redo will move it back up. A new move will erase any next stage(s).
There are many useful concepts tied to game state.
Game state makes Undo functionality simple. Undo is tied to being able to generate a previous state of the game.
Similarly, Redo is about generating the next state.
Game state helps to keep the logical representation of the game separate from the physical (visual)
representation of the game on the screen. This improves code quality and clarity.
Game state is what is saved when saving a game. To already have a game state concept makes saving games easy.
Similarly, loading a game must generate the visual representation on the screen.
Game state may be the basis for developing a computer opponent. A tree of game states with possible moves
and counter-moves can be generated and their relative merit decided to calculate the best move.
Test code for game state is found here [EDIT: new link]. Counters can be moved, flipped, rotated and deleted. The moves can be undone and redone.
