From 8ebb5e0cc37bfb928743d3c7d13811d6b9baa1d7 Mon Sep 17 00:00:00 2001 From: synth-ruiner Date: Mon, 9 Mar 2015 12:28:17 +0000 Subject: [PATCH 01/11] Add Google Analytics --- index.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/index.html b/index.html index 125e72c..8ca8b13 100644 --- a/index.html +++ b/index.html @@ -656,6 +656,15 @@ $('#gameOver').hide(); }); +
From 160b665cd433799386871ab7711056eabb6a52fa Mon Sep 17 00:00:00 2001 From: synth-ruiner Date: Mon, 9 Mar 2015 13:02:27 +0000 Subject: [PATCH 02/11] skull & crossbones icon for mines --- index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.html b/index.html index 8ca8b13..300a310 100644 --- a/index.html +++ b/index.html @@ -174,6 +174,7 @@ li.mine.revealed { background-color: #d23000; + color: #000; } li.mines1 { @@ -552,6 +553,7 @@ if ($(this).isMine()) { $(this).addClass("revealed"); + $(this).html("☠"); //skull & crossbones //game over, or lose a life, or whatever //... From 2c007f7c81984611bd5ce26fc87417b1d7f348b6 Mon Sep 17 00:00:00 2001 From: synth-ruiner Date: Mon, 9 Mar 2015 18:15:26 +0000 Subject: [PATCH 03/11] need to add credits etc. --- index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/index.html b/index.html index 300a310..685c7af 100644 --- a/index.html +++ b/index.html @@ -676,6 +676,7 @@

game over

+
From 814805784969372cf1ffc6a5af842f9de1f791df Mon Sep 17 00:00:00 2001 From: synth-ruiner Date: Mon, 9 Mar 2015 19:34:50 +0000 Subject: [PATCH 04/11] Reset button Also, credits --- index.html | 54 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 47 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 685c7af..dcff2fa 100644 --- a/index.html +++ b/index.html @@ -47,6 +47,20 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#768087', endColorstr='#53595e',GradientType=0 ); } + #stats button { + margin: 1vmin; + float: right; + font-family: Helsinki; + font-size: 3vmin; + border-radius: 2vmin; + padding: 1.75vmin; + box-shadow: 0.5vmin 0.5vmin 0 #000; + border: 0.4vmin solid #454e52; + position: relative; + top: auto; + left: auto; + } + #stats div { float: left; font-size: 5.4vmin; @@ -66,8 +80,6 @@ } #setup h1 { - margin-top: 6vmin; - margin-bottom: 6vmin; } #setup h2 { @@ -121,6 +133,11 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#768087', endColorstr='#53595e',GradientType=0 ); } + button.cancel { + right: 20vmin; + left: auto; + } + h1, h2 { text-align: center; } @@ -128,7 +145,8 @@ h1 { color: #a4f4b4; font-size: 12vmin; - margin: 16vmin 0; + margin-top: 6vmin; + margin-bottom: 6vmin; text-shadow: 1vmin 1vmin 0 #fe7ac6; /* x y blur-radius colour */ } @@ -507,14 +525,31 @@ }); $('#gameOver button').on("click", function() { - //reset game board drawGameBoard(); $('#gameOver').hide(); + $('button.cancel').hide(); + $('button.start').removeAttr('style'); $('#setup').show(); }); - $('#setup button').on("click", function() { + $('button.reset').on("click", function() { + //prompt user with setup screen + $('#setup').show(); + $('button.cancel').show(); + $('button.start').css('left', '20vmin'); + }); + + $('button.cancel').on("click", function() { + //prompt user with setup screen + $('#setup').hide(); + $('button.cancel').hide(); + $('button.start').removeAttr('style'); + }); + + $('button.start').on("click", function() { + drawGameBoard(); + //reset stats firstClick = true; @@ -656,6 +691,7 @@ drawGameBoard(); $('#gameOver').hide(); + $('button.cancel').hide(); }); -
Score: 0
Mines left: 0
+

game over

a game by max bradbury