summaryrefslogtreecommitdiff
path: root/src/Thue/Interpreter.hs
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2014-04-14 03:36:36 +1000
committerJed Barber <jjbarber@y7mail.com>2014-04-14 03:36:36 +1000
commit07812f903e0d09b4bb8c2ff9ac4310eb0d3ab8ee (patch)
tree9ec1d8edf74b4acaef153f07f0ad4544578066b5 /src/Thue/Interpreter.hs
parentf298fcb268dbd4fe74d752077f8f012532d095c1 (diff)
Everything done for v2a except the actual character parsing
Diffstat (limited to 'src/Thue/Interpreter.hs')
-rw-r--r--src/Thue/Interpreter.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Thue/Interpreter.hs b/src/Thue/Interpreter.hs
index 3e82826..c9758a0 100644
--- a/src/Thue/Interpreter.hs
+++ b/src/Thue/Interpreter.hs
@@ -12,10 +12,6 @@ import Thue.Parser
-data ThueVersion = Ver1 | Ver2a
- deriving (Eq)
-
-
data Choice = Random StdGen
| First
| Last
@@ -26,9 +22,10 @@ thue :: ThueProgram -> IO ThueState
thue program =
let rules = thueRules program
state = thueInitialState program
+ version = thueVersion program
gen = mkStdGen 4 --chosen by fair dice roll, guaranteed to be random
- in interpret Ver1 rules (Random gen) state
+ in interpret version rules (Random gen) state