Refactoring: Reorder code for meaning.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sun, 19 Oct 2014 01:01:49 +0300
changeset 153 5a2d38d67319
parent 152 07814b979a8a
child 154 c6d9b84d9391
Refactoring: Reorder code for meaning.
board.js
--- a/board.js	Sat Sep 27 00:12:54 2014 +0300
+++ b/board.js	Sun Oct 19 01:01:49 2014 +0300
@@ -539,9 +539,9 @@
             to[0][j] = 0;
             to[1][j] = 0;
             if (f2 === f3) {
+                updated = true;
                 to[2][j] = 0;
                 to[3][j] = f3 + 1;
-                updated = true;
             } else {
                 to[2][j] = f2;
                 to[3][j] = f3;
@@ -1583,9 +1583,9 @@
         to.aa = 0;
         to.ba = 0;
         if (f2 === f3) {
+            updated = true;
             to.ca = 0;
             to.da = f3 + 1;
-            updated = true;
         } else {
             to.ca = f2;
             to.da = f3;