ReversibleGame
public protocol ReversibleGame: Game
A representation of a game with support for rewinding.
Requires
Must be immutable & have value semantics.-
Rewind the game by undoing a move to the game’s current state.
Declaration
Swift
func reverse(move: Move) -> Self
Return Value
An updated game at the newly calculated prior state.