 		@playfield.addPath path
 
 	return
+
+
+LazyRuntime::_getCurrentPath = ({ x, y, dir }, compiler) ->
+	path = @pathSet.getStartingFrom x, y, dir
+
+	if not path?
+		newPath = @_getPath x, y, dir
+
+		path = switch newPath.type
+			when 'simple'
+				@_registerPath newPath.path, compiler
+				newPath.path
+			when 'looping'
+				@_registerPath newPath.loopingPath, compiler
+				newPath.loopingPath
+			when 'composed'
+				@_registerPath newPath.initialPath, compiler
+				@_registerPath newPath.loopingPath, compiler
+				newPath.initialPath
+
+	path
+
+
+LazyRuntime::_turn = (pointer, char) ->
+	if char == '|'
+		if @programState.pop() == 0
+			pointer.turn 'v'
+		else
+			pointer.turn '^'
+		pointer.advance()
+	else if char == '_'
+		if @programState.pop() == 0
+			pointer.turn '>'
+		else
+			pointer.turn '<'
+		pointer.advance()
+	else if char == '?'
+		pointer.turn '^<v>'[Math.random() * 4 | 0]
+		pointer.advance()
+	else
+		pointer.turn char
 
 
 LazyRuntime::execute = (@playfield, options, input = []) ->

	char.charCodeAt 0


LazyRuntime::registerPath = (path, compiler) ->
	@stats.compileCalls++
	compiler.compile path
	if path.list.length


		currentChar = @playfield.getAt pointer.x, pointer.y

		# program ended
		break if currentChar == '@'

		@_turn pointer, currentChar

	return

