Mercurial > repos > icfp2014
changeset 29:5d1ac440b9db
Seems to be working in CPU simulator. Need to remove debug crap
author | William Morgan <billjunk@mrgn.org> |
---|---|
date | Sat, 26 Jul 2014 00:18:58 -0700 |
parents | 75c97fb80602 |
children | 3287eb6c25fe |
files | code/dotScanner.lm |
diffstat | 1 files changed, 25 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/code/dotScanner.lm Sat Jul 26 00:03:41 2014 -0700 +++ b/code/dotScanner.lm Sat Jul 26 00:18:58 2014 -0700 @@ -208,23 +208,31 @@ if: (continuations isInteger?) { notdone <- 0 } else: { - print: 6 - continuations <- flatten: (fold: continuations [] with: :acc el{ + print: #[6 continuations] + continuations <- fold: continuations [] with: :acc el{ print: 7 ret <- acc if: notdone { + print: 25 ret <- el: if: (ret isInteger?) { } else: { + print: #[26 ret] if: (ret value) { + print: 27 notdone <- 0 ret <- (ret tail) } else: { + print: 28 ret <- (ret tail) | acc } } } else: {} - }) + ret + } + if: notdone { + continuations <- flatten: continuations + } else: {} } } continuations @@ -272,8 +280,10 @@ move <- 0 while: { move < 4 } do: { ret <- (makeContClos: grid (calcPos: move myLoc) move | path) | ret + move <- move + 1 } ret <- #[0 ret] + print: 21 } else: {} } } @@ -302,7 +312,18 @@ #[0 (path value)] } - main <- :initWorld mystery { + main <- { + print: (step: 0 #[ + [ + [0 0 0 0] + [0 2 2 0] + [0 1 0 0] + [0 0 0 0] + ] + #[0 #[1 2] 2 3 0] + [] + 0 + ]) #[0 step] } }