Fix: return wrong status on move operation (that move not possible up).
--- a/board.js Sun Oct 19 01:01:49 2014 +0300
+++ b/board.js Sun Oct 19 01:04:19 2014 +0300
@@ -760,10 +760,10 @@
continue;
}
if (f1 === f0) {
+ updated = true;
to[3][j] = 0;
to[0][j] = f0 + 1;
if (f3 === f2) { // a a b b
- updated = true;
to[2][j] = 0;
to[1][j] = f2 + 1;
} else { // a a b c
@@ -2359,10 +2359,10 @@
to.aa = f0;
}
} else if (f1 === f0) {
+ updated = true;
to.da = 0;
to.aa = f0 + 1;
if (f3 === f2) { // a a b b
- updated = true;
to.ca = 0;
to.ba = f2 + 1;
} else { // a a b c
@@ -2453,10 +2453,10 @@
to.ab = f0;
}
} else if (f1 === f0) {
+ updated = true;
to.db = 0;
to.ab = f0 + 1;
if (f3 === f2) { // a a b b
- updated = true;
to.cb = 0;
to.bb = f2 + 1;
} else { // a a b c
@@ -2547,10 +2547,10 @@
to.ac = f0;
}
} else if (f1 === f0) {
+ updated = true;
to.dc = 0;
to.ac = f0 + 1;
if (f3 === f2) { // a a b b
- updated = true;
to.cc = 0;
to.bc = f2 + 1;
} else { // a a b c
@@ -2641,10 +2641,10 @@
to.ad = f0;
}
} else if (f1 === f0) {
+ updated = true;
to.dd = 0;
to.ad = f0 + 1;
if (f3 === f2) { // a a b b
- updated = true;
to.cd = 0;
to.bd = f2 + 1;
} else { // a a b c