Skip to content

Instantly share code, notes, and snippets.

@asandroq
Created December 1, 2009 19:44
Show Gist options
  • Save asandroq/246572 to your computer and use it in GitHub Desktop.
Save asandroq/246572 to your computer and use it in GitHub Desktop.
(let* ((ser (with-input-from-file "state.scm"
(lambda () (read))))
(obj (u8vector->object ser)))
(cond
((game-state? obj
obj)
((game-state-1? obj)
(game-state-from-v1 obj))
((game-state-2? obj)
(game-state-from-v2 obj))
(else
(raise "This is not a game state!"))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment