Skip to content

Commit

Permalink
update to support safari
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongxiali committed Mar 9, 2014
1 parent d8fcd2c commit 90dfe5f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
14 changes: 11 additions & 3 deletions StatesMinesweeper/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
<p style=" font-weight:bold">Only click on those you think are clean!</p>
Good Luck!
</div>
<div id="dialog2" title="States Minesweeper!!">
<p style=" font-weight:bold">BOOM!!!!!</p>
Good luck next time!
</div>
<div id="dialog3" title="States Minesweeper!!">
<p style=" font-weight:bold">You win!!!</p>
Good job!!
</div>
<div id="right" style=" float:left;width:40%">
<div id="Tital" style="font-size:xx-large;margin-left:1%;">
States Minesweeper!
Expand All @@ -35,9 +43,9 @@
<div style=" width:90%; height:20px">
<div style="width:2%; height:90%; float:left"></div>
<div style="width:5%; height:90%; float:left; border-style:solid; border-color:White; border-width:2px; background:rgb(100, 100, 255)"></div>
<div style="width:55px; height:90%; float:left;">:Unknown</div>
<div style="width:70px; height:90%; float:left;">:Unknown</div>
<div style="width:5%; height:90%; float:left; border-style:solid; border-color:White; border-width:2px; background:rgb(255, 255, 80)"></div>
<div style="width:100px; height:90%; float:left;">:NextToMine(s)</div>
<div style="width:110px; height:90%; float:left;">:NextToMine(s)</div>
<div style="width:5%; height:90%; float:left; border-style:solid; border-color:White; border-width:2px; background:rgb(150, 150, 150)"></div>
<div style="width:45px; height:90%; float:left;">:Clean</div>
<div style="width:5%; height:90%; float:left; border-style:solid; border-color:White; border-width:2px; background:rgb(255, 50, 50)"></div>
Expand All @@ -47,7 +55,7 @@
</div>
</div>
<div id="Div1" style="float:left;width:10%; height:10%; border-left-style:solid; border-left-color:Silver; border-left-width:3px;">
<div id="num" style=" font-size:40px; margin-left:0%; margin-top:7%">
<div id="num" style=" font-size:30px; margin-left:0%; margin-top:7%">
4 Mines
</div>
</div>
Expand Down
12 changes: 7 additions & 5 deletions StatesMinesweeper/js/javascript-Minesweeper.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ Map, FeatureLayer, InfoTemplate, SimpleLineSymbol, SimpleFillSymbol, TextSymbol,
featureLayer2.setRenderer(renderer2);
map.addLayer(featureLayer2);
map.addLayer(featureLayer1);
$("#dialog").dialog({ autoOpen: true, width: 400 });
$("#dialog").dialog({ autoOpen: true, width: 300 });
$("#dialog2").dialog({ autoOpen: false, width: 300 });
$("#dialog3").dialog({ autoOpen: false, width: 300 });
for (var i = 0; i <= 50; i++) sadd[i] = 0;
var f = 0;
while (f < mm)
Expand Down Expand Up @@ -85,14 +87,14 @@ Map, FeatureLayer, InfoTemplate, SimpleLineSymbol, SimpleFillSymbol, TextSymbol,
SimpleFillSymbol.STYLE_SOLID, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,
new Color([255, 255, 255]), 2), new Color([255, 255, 50, 0])));
featureLayer1.redraw();
alert("BOOM!!!!!");
location.reload();}
$( "#dialog2" ).dialog( "open" ); $("#dialog2").dialog({close:
function( event, ui ) {location.reload();}});}
else if (sadd[ck] >= 0 && clean.indexOf(ck) == -1)
cleanner(ck);
featureLayer1.redraw();
if (clean.length >= 46)
{ alert("You win!!!!!");
location.reload();}
{ $( "#dialog3" ).dialog( "open" );$("#dialog3").dialog({close:
function( event, ui ) {location.reload();}});}
});
}
});

0 comments on commit 90dfe5f

Please sign in to comment.