");
for(var j = 0; j < this.numCol; j++) {
this.cells[i][j] = new Cell();
+ $("#row"+i.toString()).append("
");
}
- }
+ }
+ // Adjust Dimensions of Base
+ var edgeThickness = 2 * (parseInt($(".cell").css("border-left-width")) + parseInt($(".cell").css("margin")) + parseInt($(".cell").css("padding")));
+ $(".base").height(numRow * ($(".cell").height() + edgeThickness) + 10);
+ $(".base").width(numCol * ($(".cell").width() + edgeThickness) + 10);
// Seed mines randomly in grid, adds them to minedCells[] and calculate each cell's risk
for(var c = 0; c < numMines; c++) {
diff --git a/ams_board.css b/ams_board.css
index 1eaa956..a1dfc88 100644
--- a/ams_board.css
+++ b/ams_board.css
@@ -4,9 +4,6 @@ div {
.base {
background-color: gray;
- height: 410px;
- width: 410px;
- /*for a 15*15 grid.*/
}
.cell {
diff --git a/bower.json b/bower.json
new file mode 100644
index 0000000..22e6353
--- /dev/null
+++ b/bower.json
@@ -0,0 +1,27 @@
+{
+ "name": "AlbertMineSweeper",
+ "version": "0.0.0",
+ "homepage": "https://github.com/albertliangcode/AlbertMineSweeper",
+ "authors": [
+ "albertliangcode
"
+ ],
+ "moduleType": [
+ "amd",
+ "es6",
+ "globals",
+ "node",
+ "yui"
+ ],
+ "license": "MIT",
+ "private": true,
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ],
+ "dependencies": {
+ "jquery": "~2.1.3"
+ }
+}
diff --git a/index.html b/index.html
index 10628ed..6acaca4 100644
--- a/index.html
+++ b/index.html
@@ -11,14 +11,15 @@
Albert Mine Sweeper
Project Status:
- - Current: End Conditions
- - Next: Adjustable Game
+ - Current: Adjustable GameBoard
- Next: User Interface for:
- Resetting Game
- Adjusting Game Settings
+ - Next: No First-Click Deaths
+ - Next: End Conditions (UI Freeze)
- Next: Clock
- Next: Scoreboard?
- Next: Match Graphics to MS Minesweeper?
@@ -32,45 +33,15 @@ Project Status:
+
+
+