view code/simple.lm @ 24:37158acf31e5

Initial pass at scan loop
author William Morgan <billjunk@mrgn.org>
date Fri, 25 Jul 2014 22:52:05 -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]
	}
}