diff --git a/js/index.html b/js/index.html
index 7863d54..3336f5b 100644
--- a/js/index.html
+++ b/js/index.html
@@ -14,8 +14,9 @@
Select Map:
Moves:
diff --git a/js/mine.js b/js/mine.js
index 195d596..2d3d08b 100644
--- a/js/mine.js
+++ b/js/mine.js
@@ -107,7 +107,8 @@ var Mine = function() {
case ' ':
case '.':
case '\\': return true;
- case 'L': return 0 == this.lambdas;
+ case 'L': return false;
+ case 'O': return true;
case '*':
if (this.robot.x + 2*n < 0) return false;
if (this.robot.x + 2*n >= this.width) return false;
@@ -124,7 +125,8 @@ var Mine = function() {
case ' ':
case '.':
case '\\': return true;
- case 'L': return 0 == this.lambdas;
+ case 'L': return false;
+ case 'O': return true;
case '*': return false;
" style="}
break;
@@ -153,7 +155,7 @@ var Mine = function() {
this.lambdas--;
this.found_lambdas++;
break;
- case 'L':
+ case 'O':
this._foundLift();
break;
}
@@ -169,7 +171,7 @@ var Mine = function() {
this.lambdas--;
this.found_lambdas++;
break;
- case 'L':
+ case 'O':
this._foundLift();
break;
}
@@ -182,6 +184,9 @@ var Mine = function() {
}
}
this.moves++;
+ if (0 == this.lambdas) {
+ if (false !== this.lift) this.map[this.lift.y][this.lift.x] = 'O';
+ }
var newMap = [], x, y, below;
for (y = 0; y < this.height; ++y) { newMap[y] = this.map[y].slice(); }