changeset 31:3812bf35168d

Simple AI seems to work now. Lots of debug junk needs to be removed though
author Michael Pavone <pavone@retrodev.com>
date Sat, 26 Jul 2014 00:58:50 -0700
parents 3287eb6c25fe
children 934d03d42a7e
files code/dotScanner.lm
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/code/dotScanner.lm	Sat Jul 26 00:23:19 2014 -0700
+++ b/code/dotScanner.lm	Sat Jul 26 00:58:50 2014 -0700
@@ -207,24 +207,32 @@
 				notdone <- 0
 			} else: {
 				continuations <- fold: continuations [] with: :acc el{
+					print: #[20 acc]
 					ret <- acc
 					if: notdone {
 						ret <- el:
+						print: #[11 ret]
 						if: (ret isInteger?) {
+							ret <- acc
 						} else: {
 							if: (ret value) {
+								print: 12
 								notdone <- 0
 								ret <- (ret tail)
 							} else: {
+								print: 13
 								ret <- (ret tail) | acc
 							}
 						}
 					} else: {}
+					print: #[21 ret]
 					ret
 				}
+				print: #[15 continuations]
 				if: notdone {
 					continuations <- flatten: continuations
 				} else: {}
+				print: #[16 continuations]
 			}
 		}
 		continuations
@@ -274,6 +282,7 @@
 				}
 			} else: {
 			}
+			print: #[10 myLoc ret]
 			ret
 		}
 	}
@@ -286,7 +295,9 @@
 		visited <- treeMap: grid :row {
 			treeMap: row :el { 0 }
 		}
+		print: #[5 myLoc]
 		path <- advancer: [(makeContClos: grid myLoc [])]
+		print: path
 		#[0 (path value)]
 	}