view src/lifter.tp @ 20:50a456168c25

Split readFd out of readFile for use in lifter. Add code to read map from stdin to lifter using code in sim
author Mike Pavone <pavone@retrodev.com>
date Sat, 14 Jul 2012 12:33:01 -0700
parents bb29dcd46cbf
children 7a274d6026c8
line wrap: on
line source

#{
	true <- #{
	  if:else <- :self trueblock :elseblock {
		trueblock:
	  }
	}

	false <- #{
	  if:else <- :self trueblock :elseblock {
		elseblock:
	  }
	}
	
	main <- {
		text <- sim readFd: 0
		playfield <- (sim state) fromStr: text
		os write: 2 text
		os write: 2 "width: " . (string: (playfield width)) . "\n"
		os write: 2 "height: " . (string: (playfield height)) . "\n"
	}
}