diff --git a/index.html b/index.html
index c961122..914253c 100644
--- a/index.html
+++ b/index.html
@@ -260,7 +260,7 @@
}
window.removeClearedRows = function() {
- var rowsToRemove = $('#game ul').filter(function() {
+ var rowsToRemove = $('#game ul:not(.removing)').filter(function() {
return $(this).checkRow();
});
@@ -268,6 +268,8 @@
if (rowsToRemove.length == 0) return;
+ rowsToRemove.addClass("removing");
+
rowsToRemove.each(function() {
score += $(this).children('.mine').length;
@@ -371,10 +373,6 @@
return $(this).parent('ul').index();
}
- $.fn.getGameboardPos = function() {
- return gameBoard[$(this).getY()][$(this).getX()];
- }
-
$.fn.isMine = function() {
return $(this).hasClass("mine");
}
@@ -550,7 +548,7 @@
});
- $(document).on("mousedown", "li", function(event) {
+ $(document).on("mousedown touchstart", "li", function(event) {
var x = $(this).getX();
var y = $(this).getY();
@@ -564,7 +562,7 @@
clearTimeout(timeout);
});
- $(document).on("mouseup", "li", function(event) {
+ $(document).on("mouseup touchend", "li", function(event) {
event.preventDefault();
clearTimeout(timeout);