Mercurial > repos > icfp2014
view code/simple.lm @ 12:1c6d4f2642d0
Fist progress toward a simple recursive dot scanner bot
author | William Morgan <billjunk@mrgn.org> |
---|---|
date | Fri, 25 Jul 2014 19:19:07 -0700 |
parents | 2a74559e07f5 |
children | 84f595cff062 |
line wrap: on
line source
#{ counterLoad <- 4 step <- :myState world { move <- myState value counter <- (myState tail) - 1 if: counter = 0 { move <- move + 1 counter <- counterLoad if: move = 4 { move <- 0 } else: {} } else: {} #[#[move counter] move] } main <- :initWorld mystery { #[#[0 counterLoad] step] } }