Skip to content

Commit

Permalink
Don't add a new tile when nothing has changed
Browse files Browse the repository at this point in the history
  • Loading branch information
bulenkov committed May 9, 2014
1 parent e7e1123 commit 1af8e68
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/com/bulenkov/game2048/Game2048.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,9 @@ private boolean compare(Tile[] line1, Tile[] line2) {
}

for (int i = 0; i < line1.length; i++) {
if (!line1[i].equals(line2[i]))
if (line1[i].value != line2[i].value) {
return false;
}
}
return true;
}
Expand Down

0 comments on commit 1af8e68

Please sign in to comment.