Edit in JSFiddle

function _log(data)
{
	// console.log(data);
}

var minesweeper_obj = {

	defaults : {
		dimension : {
			width : {
				defaultValue : 12,
				min : 4,
				max : 20,
			},
			height : {
				defaultValue : 15,
				min : 4,
				max : 25,
			},
		},
		bombPercentage : {
			defaultValue : 12,
			min : 1,
			max : 99,
		},
		elements : {
			tableID : 'minesweeperstage', 
			unknownTdClass : 'unknowncell',
			knownTdClass : 'knowncell',
			knownNumberTdClassPrefix : 'knowncell_',
			flagTdClass : 'flagcell',
			clueTdClass : 'cluecell',
			bombTdClass : 'bombcell',
			bombAnsTdClass : 'bombanscell',
			bombRightAnsTdClass : 'rightcell',
			rowAttr : 'cellrow',
			columnAttr : 'cellcol',
			mehButtonID : 'meh',
			bombLabelID : 'bomblabel',
			timeLabelID : 'timelabel',
		},
	},
	
	dimension : {
		width : null,
		height : null,
	},
	bombPercentage : null,
	timerReference : null,
	timerCount : 0,
	cellArray : [],
	knownCells : 0,
	bombCells : 0,

	reset : function()
	{
		_log("reset() called");
		_log(" use setValues() with param = null instead..");
		this.setValues();
	},

	setValues : function(valuesObj)
	{
		_log("setValues() called");
		_log(" with param valuesObj = (" + typeof valuesObj + ")");
		_log(valuesObj);

		var valuesObj = (!_.isUndefined(valuesObj) && _.isObject(valuesObj)) ?
			valuesObj :
			{
				dimension : {
					width : this.defaults.dimension.width.defaultValue,
					height : this.defaults.dimension.height.defaultValue,
				},
				bombPercentage : this.defaults.bombPercentage.defaultValue,
			};

		(_.isUndefined(valuesObj.dimension) || !_.isObject(valuesObj.dimension)) &&
			(valuesObj.dimension = {});

		valuesObj.dimension.width = (!_.isUndefined(valuesObj.dimension.width) && _.isNumber(valuesObj.dimension.width) &&
			valuesObj.dimension.width >= this.defaults.dimension.width.min && valuesObj.dimension.width <= this.defaults.dimension.width.max) ?
			valuesObj.dimension.width :
			this.defaults.dimension.width.defaultValue;

		valuesObj.dimension.height = (!_.isUndefined(valuesObj.dimension.height) && _.isNumber(valuesObj.dimension.height) &&
			valuesObj.dimension.height >= this.defaults.dimension.height.min && valuesObj.dimension.height <= this.defaults.dimension.height.max) ?
			valuesObj.dimension.height :
			this.defaults.dimension.height.defaultValue;

		valuesObj.bombPercentage = (!_.isUndefined(valuesObj.bombPercentage) && _.isNumber(valuesObj.bombPercentage) &&
			valuesObj.bombPercentage >= this.defaults.bombPercentage.min && valuesObj.bombPercentage <= this.defaults.bombPercentage.max) ?
			valuesObj.bombPercentage :
			this.defaults.bombPercentage.defaultValue;

		this.dimension = valuesObj.dimension;
		this.bombPercentage = valuesObj.bombPercentage;
		this.knownCells = 0, this.bombCells = 0;

		_log("  after process, this values change to..");
		_log(valuesObj);

		valuesObj = null;
		this.cellArray = [];
	},

	plantBombsInArray : function(startPosition)
	{
		_log("plantBombsInArray() called");

		if (
			!_.isUndefined(startPosition) && _.isObject(startPosition) &&
			!_.isUndefined(startPosition.r) && _.isNumber(startPosition.r) && startPosition.r >= 0 && startPosition.r < this.dimension.height &&
			!_.isUndefined(startPosition.c) && _.isNumber(startPosition.c) && startPosition.c >= 0 && startPosition.c < this.dimension.width
		)
		{
			_log(" with valid param startPosition = (" + typeof startPosition + ")");
			_log(startPosition);

			this.bombCells = 0;
			this.cellArray = [];
			var tmpCellArray = [];

			for (var r = 0; r < this.dimension.height; r++)
			{
				this.cellArray[r] = [];
				for (var c = 0; c < this.dimension.width; c++)
				{
					this.cellArray[r][c] = 0;
					(startPosition.c != c || startPosition.r != r) && tmpCellArray.push([r,c]);
				}
			}

			var bombsRemains = this.getBombCells();
			this.bombCells = bombsRemains;

			while (bombsRemains > 0)
			{
				var _tmp = chance.integer({
					min : 0,
					max : tmpCellArray.length - 1,
				});

				var bombPoint = tmpCellArray[_tmp];
				tmpCellArray.splice(_tmp, 1);
				this.cellArray[bombPoint[0]][bombPoint[1]] = -1;

				var _tmprp = (bombPoint[0] - 1),
					_tmprn = (bombPoint[0] + 1),
					_tmpcp = (bombPoint[1] - 1),
					_tmpcn = (bombPoint[1] + 1);

				for (var i = _tmprp; i <= _tmprn; i++)
				{
					if (!_.isUndefined(this.cellArray[i]) && _.isArray(this.cellArray[i]))
					{
						for (var j = _tmpcp; j <= _tmpcn; j++)
						{
							if (!_.isUndefined(this.cellArray[i][j]) && _.isNumber(this.cellArray[i][j]))
							{
								this.cellArray[i][j] = (this.cellArray[i][j] >= 0) ?
									this.cellArray[i][j] += 1 :
									this.cellArray[i][j];
							}
						}
					}
				}

				_tmp = null,
				bombPoint = null,
				_tmprp = null,
				_tmprn = null,
				_tmpcp = null,
				_tmpcn = null;

				bombsRemains -= 1;
			}

			tmpCellArray = null,
			bombsRemains = null;

			return true;
		}
		else
		{
			_log(" with INVALID param startPosition = (" + typeof startPosition + ")");
			_log(startPosition);
			alert("Error");
			return false;
		}
	},

	getBombCells : function()
	{
		_log("getBombCells() called");

		if (
			!_.isNull(this.dimension.width) && _.isNumber(this.dimension.width) && this.dimension.width >= this.defaults.dimension.width.min && this.dimension.width <= this.defaults.dimension.width.max &&
			!_.isNull(this.dimension.height) && _.isNumber(this.dimension.height) && this.dimension.height >= this.defaults.dimension.height.min && this.dimension.height <= this.defaults.dimension.height.max &&
			!_.isNull(this.bombPercentage) && _.isNumber(this.bombPercentage) && this.bombPercentage >= this.defaults.bombPercentage.min && this.bombPercentage <= this.defaults.bombPercentage.max
		)
		{
			_log(" found this.dim.w & this.dim.h & this.bombp");
			_log("  this.dim.w = (" + typeof this.dimension.width + ") " +  this.dimension.width);
			_log("  this.dim.h = (" + typeof this.dimension.height + ") " +  this.dimension.height);
			_log("  this.bombp = (" + typeof this.bombPercentage + ") " +  this.bombPercentage);

			var toreturn = Math.ceil(this.bombPercentage * (this.dimension.width * this.dimension.height) / 100);
			toreturn = (toreturn > 0) ?
				(
					(toreturn < (this.dimension.width * this.dimension.height)) ?
						toreturn :
						toreturn - 1
				)
				: 1;
			_log("   with dimension " + this.dimension.width + " x " + this.dimension.height + ", and bomb percentage = " + this.bombPercentage + "% ...bomb = " + toreturn);
			return toreturn;
		}
		else
		{
			_log(" NOT found this.dim.w & this.dim.h & this.bombp");
			_log("  this.dim.w = (" + typeof this.dimension.width + ") " +  this.dimension.width);
			_log("  this.dim.h = (" + typeof this.dimension.height + ") " +  this.dimension.height);
			_log("  this.bombp = (" + typeof this.bombPercentage + ") " +  this.bombPercentage);
			alert("Error");
			return null;
		}
	},

	renderHTML : function()
	{
		_log("renderHTML() called");
		if (
			!_.isUndefined(this.dimension) && _.isObject(this.dimension) &&
			!_.isUndefined(this.dimension.width) && _.isNumber(this.dimension.width) && (this.dimension.width >= this.defaults.dimension.width.min) && (this.dimension.width <= this.defaults.dimension.width.max) &&
			!_.isUndefined(this.dimension.height) && _.isNumber(this.dimension.height) && (this.dimension.height >= this.defaults.dimension.height.min) && (this.dimension.height <= this.defaults.dimension.height.max) &&
			!_.isUndefined(this.bombPercentage) && _.isNumber(this.bombPercentage) && (this.bombPercentage >= this.defaults.bombPercentage.min) && (this.bombPercentage <= this.defaults.bombPercentage.max)
		)
		{
			$('#' + this.defaults.elements.bombLabelID).text(this.getBombCells());

			_log(" with valid this.dim.w, this.dim.h, this.bombp");
			_log("  this.dim.w = (" + typeof this.dimension.width + ") " +  this.dimension.width);
			_log("  this.dim.h = (" + typeof this.dimension.height + ") " +  this.dimension.height);
			_log("  this.bombp = (" + typeof this.bombPercentage + ") " +  this.bombPercentage);

			var ele = this.defaults.elements;
			var innerTableHTML = '';
			for (var r = 0; r < this.dimension.height; r++)
			{
				var eachrow = '';
				for (var c = 0; c < this.dimension.width; c++)
				{
					eachrow += '<td class="' + ele.unknownTdClass + '" cellrow="' + r + '" cellcol="' + c + '"></td>';
				}
				innerTableHTML += '<tr>' + eachrow + '</tr>';
				eachrow = null;
			}

			$('table#'+ele.tableID).html(innerTableHTML);
			innerTableHTML = null,
			ele = null;
			this.onReset();
			this.timerReset();
			return true;
		}
		else
		{
			_log(" with INVALID this.dim.w, this.dim.h, this.bombp");
			_log("  this.dim.w = (" + typeof this.dimension.width + ") " +  this.dimension.width);
			_log("  this.dim.h = (" + typeof this.dimension.height + ") " +  this.dimension.height);
			_log("  this.bombp = (" + typeof this.bombPercentage + ") " +  this.bombPercentage);
			alert("Error");
			return false;
		}
	},

	answerGame : function()
	{
		_log("answerGame() called");

		var ele = this.defaults.elements;

		for (var x in this.cellArray)
		{
			for (var y in this.cellArray[x])
			{
				if (this.cellArray[x][y] == -1){

					_log(" cell [" + x + "," + y + "] has a bomb");

					var ansCell = $('table#' + this.defaults.elements.tableID + ' td[' + this.defaults.elements.rowAttr + '="' + x + '"]' + '[' + this.defaults.elements.columnAttr + '="' + y + '"]');

					if (!ansCell.hasClass(ele.bombTdClass))
					{
						ansCell.addClass(ele.bombAnsTdClass);
						ansCell.hasClass(ele.flagTdClass) &&
							ansCell.addClass(ele.bombRightAnsTdClass);
					}
					ansCell = null;
				}
			}
		}
		ele = null;
	},

	cellReturnValue : function(position)
	{
		_log("cellReturnValue() called");

		if (
			!_.isUndefined(position) && _.isObject(position) &&
			!_.isUndefined(position.r) && _.isNumber(position.r) && position.r >= 0 && position.r < this.dimension.height &&
			!_.isUndefined(position.c) && _.isNumber(position.c) && position.c >= 0 && position.c < this.dimension.width
		)
		{
			_log(" with valid position");
			_log("  position.r = (" + typeof position.r + ") " +  position.r);
			_log("  position.c = (" + typeof position.c + ") " +  position.c);
			if (
				!_.isUndefined(this.cellArray) && _.isArray(this.cellArray) &&
				!_.isUndefined(this.cellArray[ position.r ]) && _.isArray(this.cellArray[ position.r ]) &&
				!_.isUndefined(this.cellArray[ position.r ][ position.c ]) && _.isNumber(this.cellArray[ position.r ][ position.c ])
			)
			{
				_log("  and with valid this.cellArray");
				_log("   this.cellArray = (" + typeof this.cellArray + ") ");
				_log(this.cellArray);

				return this.cellArray[ position.r ][ position.c ];
			}
			else
			{
				_log("  but with INVALID this.cellArray");
				_log("   this.cellArray = (" + typeof this.cellArray + ") ");
				_log(this.cellArray);
				alert("Error");
				return false;
			}
		}
		else
		{
			_log(" with INVALID position");
			_log("  position.r = (" + typeof position.r + ") " +  position.r);
			_log("  position.c = (" + typeof position.c + ") " +  position.c);
			alert("Error");
			return false;
		}
	},

	rightClickHandler : function(target)
	{
		if (this.knownCells >= 0)
		{
			_log("rightClickHandler() called");
			var ele = this.defaults.elements;
			if (!_.isUndefined($(target).attr(ele.columnAttr)) && !_.isUndefined($(target).attr(ele.rowAttr)))
			{
				_log(" with valid attr " + ele.rowAttr + " and " + ele.columnAttr);
				_log("  ele.rowAttr = (" + typeof ele.rowAttr + ") " +  ele.rowAttr);
				_log("  ele.columnAttr = (" + typeof ele.columnAttr + ") " +  ele.columnAttr);

				if ($(target).hasClass(ele.unknownTdClass) && !$(target).hasClass(ele.knownTdClass))
				{
					if ($(target).hasClass(ele.flagTdClass))
					{
						$(target).removeClass(ele.flagTdClass);
						$(target).addClass(ele.clueTdClass);
					}
					else if ($(target).hasClass(ele.clueTdClass))
					{
						$(target).removeClass(ele.clueTdClass);
						$(target).removeClass(ele.flagTdClass);
					}
					else
					{
						$(target).removeClass(ele.flagTdClass);
						$(target).removeClass(ele.clueTdClass);
						$(target).addClass(ele.flagTdClass);
					}
				}
			}
			else
			{
				_log(" with INVALID attr " + ele.rowAttr + " or " + ele.columnAttr);
				_log("  ele.rowAttr = (" + typeof ele.rowAttr + ") " +  ele.rowAttr);
				_log("  ele.columnAttr = (" + typeof ele.columnAttr + ") " +  ele.columnAttr);
				alert("Error");
				return false;
			}
			$('#' + this.defaults.elements.bombLabelID).text(this.getBombCells() - $('#minesweeperstage td[class~="flagcell"]').length);
			ele = null;
			return true;
		}
		else
		{
			return false;
		}
	},

	clickHandler : function(target)
	{
		if (this.knownCells >= 0)
		{
			_log("clickHandler() called");
			var ele = this.defaults.elements;
			if (!_.isUndefined($(target).attr(ele.columnAttr)) && !_.isUndefined($(target).attr(ele.rowAttr)))
			{
				_log(" with valid attr " + ele.rowAttr + " and " + ele.columnAttr);
				_log("  ele.rowAttr = (" + typeof ele.rowAttr + ") " +  ele.rowAttr);
				_log("  ele.columnAttr = (" + typeof ele.columnAttr + ") " +  ele.columnAttr);

				var targetPosition = {
					c : parseInt($(target).attr(ele.columnAttr)),
					r : parseInt($(target).attr(ele.rowAttr))
				};

				if ($(target).hasClass(ele.unknownTdClass) && !$(target).hasClass(ele.flagTdClass) && !$(target).hasClass(ele.clueTdClass))
				{
					if (_.isUndefined(this.bombCells) || !_.isNumber(this.bombCells) || this.bombCells <= 0)
					{
						this.plantBombsInArray(targetPosition);
						this.timerStart();
					}
					$(target).removeClass(ele.unknownTdClass);

					var cellClickResult = this.cellReturnValue(targetPosition);
					$(target).addClass(ele.knownTdClass);

					if (cellClickResult >= 0)
					{
						this.knownCells += 1;
						if (!_.isUndefined(this.bombCells) && _.isNumber(this.bombCells) && !_.isUndefined(this.knownCells) && _.isNumber(this.knownCells) && this.bombCells > 0)
						{
							if ((this.dimension.width * this.dimension.height) - this.knownCells === this.bombCells)
							{
								this.knownCells = -1;
								this.timerStop();
								this.onHooray();
							}

							if (cellClickResult > 0)
							{
								$(target).addClass(ele.knownNumberTdClassPrefix + cellClickResult);
							}
							else // == 0
							{ 
								for (var x = (targetPosition.r - 1) ; x <= (targetPosition.r + 1); x++)
								{
									for (var y = (targetPosition.c - 1); y <= (targetPosition.c + 1); y++)
									{
										$('table#' + this.defaults.elements.tableID + ' td[' + this.defaults.elements.rowAttr + '="' + x + '"][' + this.defaults.elements.columnAttr + '="' + y + '"]').trigger({
											type: 'mousedown',
											which: 1,
										});
										_log('table#' + this.defaults.elements.tableID + ' td[' + this.defaults.elements.rowAttr + '="' + x + '"]' + '[' + this.defaults.elements.columnAttr + '="' + y + '"]');
									}
								}
							}
						}
					}
					else
					{
						this.knownCells = -1;
						$(target).addClass(ele.bombTdClass);
						this.timerStop();
						this.onBakoom();
					}

					cellClickResult = null;
				}

				targetPosition = null;
				return true;
			}
			else
			{
				_log(" with INVALID attr " + ele.rowAttr + " or " + ele.columnAttr);
				_log("  ele.rowAttr = (" + typeof ele.rowAttr + ") " +  ele.rowAttr);
				_log("  ele.columnAttr = (" + typeof ele.columnAttr + ") " +  ele.columnAttr);
				alert("Error");
				return false;
			}
			ele = null;
		}
	},

	timerStop : function()
	{
		clearInterval(this.timerReference);
		this.timerUpdateLabel();
		return this.timerCount;
	},

	timerStart : function()
	{
		this.timerReset();
		var _ref = this;
		this.timerReference = setInterval(function(){
			_ref.timerCount += 1;
			_ref.timerUpdateLabel();
		}, 1000);
	},

	timerReset : function()
	{
		this.timerStop();
		this.timerCount = 0;
		this.timerUpdateLabel();
	},

	timerUpdateLabel : function()
	{
		$('#' + this.defaults.elements.timeLabelID).text(this.timerCount);
	},

	onBakoom : function(){
		$('#' + this.defaults.elements.mehButtonID + ' > i').removeClass('fa-meh-o fa-smile-o text-warning text-success');
		$('#' + this.defaults.elements.mehButtonID + ' > i').addClass('fa-frown-o text-danger');
		if (!_.isUndefined(this.timer))
		{
			clearInterval(this.timer);
		}
		this.answerGame();
	},

	onHooray : function()
	{
		$('#' + this.defaults.elements.mehButtonID + ' > i').removeClass('fa-meh-o fa-frown-o text-warning text-danger');
		$('#' + this.defaults.elements.mehButtonID + ' > i').addClass('fa-smile-o text-success');
		alert("H o o r a y\nYou won");
	},

	onReset : function()
	{
		$('#' + this.defaults.elements.mehButtonID + ' > i').removeClass('fa-smile-o fa-frown-o text-success text-danger');
		$('#' + this.defaults.elements.mehButtonID + ' > i').addClass('fa-meh-o text-warning');
	},
};

$(function(){

	$('table#'+minesweeper_obj.defaults.elements.tableID).on("mousedown", "td", function(e) {
		switch (e.which)
		{
			case 1: // (left) click
				minesweeper_obj.clickHandler(e.target);
				break;
			case 3: // alt (right) click
				e.preventDefault();
				minesweeper_obj.rightClickHandler(e.target);
				break;
		}
		return;
	}).bind("contextmenu", function(){return false;});

	$('input#dimensionwidth').attr('min',minesweeper_obj.defaults.dimension.width.min)
		.attr('max',minesweeper_obj.defaults.dimension.width.max)
		.attr('default-value',minesweeper_obj.defaults.dimension.width.defaultValue)
		.val(minesweeper_obj.defaults.dimension.width.defaultValue);

	$('input#dimensionheight').attr('min',minesweeper_obj.defaults.dimension.height.min)
		.attr('max',minesweeper_obj.defaults.dimension.height.max)
		.attr('default-value',minesweeper_obj.defaults.dimension.height.defaultValue)
		.val(minesweeper_obj.defaults.dimension.height.defaultValue);

	$('input#percentagebomb').attr('min',minesweeper_obj.defaults.bombPercentage.min)
		.attr('max',minesweeper_obj.defaults.bombPercentage.max)
		.attr('default-value',minesweeper_obj.defaults.bombPercentage.defaultValue)
		.val(minesweeper_obj.defaults.bombPercentage.defaultValue);

	$('input.checkpossibleinput').change(function() {
		var currentVal = parseInt($(this).val());
		currentVal = (_.isNumber(currentVal) && !_.isNaN(currentVal) && currentVal >= $(this).attr('min') && currentVal <= $(this).attr('max')) ? currentVal : $(this).attr('default-value');
		$(this).val(currentVal);
		currentVal = null;
	});

	$('#' + minesweeper_obj.defaults.elements.mehButtonID).click(function() {
		minesweeper_obj.setValues({
			dimension : {
				width : minesweeper_obj.dimension.width,
				height : minesweeper_obj.dimension.height,
			},
			bombPercentage : minesweeper_obj.bombPercentage,
		});
		minesweeper_obj.renderHTML();
	});

	$('.toggle-panel .panel-heading').click(function()
	{
		$(this).next('.panel-body').slideToggle('fast');
	});

	$('.toggle-panel .panel-body').hide();

	$('form#minesweeperconfigform').submit(function()
	{
		minesweeper_obj.setValues({
			dimension : {
				width : parseInt($('input#dimensionwidth').val()),
				height : parseInt($('input#dimensionheight').val()),
			},
			bombPercentage : parseInt($('input#percentagebomb').val()),
		});
		minesweeper_obj.renderHTML();
		return false;
	}).trigger('submit');

});
<div class="container-fluid">
	<div class="page-header">
		<h1>Minesweeper</h1>
	</div>
</div>
<div class="container-fluid">

	<div class="panel panel-primary">
		<div class="panel-heading">
			<div class="text-center">
				<button type="button" class="btn btn-default" id="meh">&nbsp;<i class="fa fa-meh-o fa-lg text-warning"></i>&nbsp;</button>
				<div class="pull-left">
					<h4><span class="label label-warning"><span class="glyphicon glyphicon-certificate"></span> <span id="bomblabel"></span></span></h4>

				</div>
				<div class="pull-right">
					<h4><span class="label label-danger"><span id="timelabel"></span> <span class="glyphicon glyphicon-time"></span></span></h4>
				</div>
			</div>
		</div>
		<div class="panel-body">
			<div class="">
				<table id="minesweeperstage" class="center-block table table-bordered">
					<tr>
						<td class="knowncell cluecell"></td>
					</tr>
				</table>
			</div>
		</div>
		<div class="panel-footer">

			<div class="toggle-panel panel panel-info" id="minesweeper-config-panel">
				<div class="panel-heading" style="cursor:pointer;">
					<h3 class="panel-title">
						<span class="glyphicon glyphicon-cog"></span> Config
					</h3>
				</div>
				<div class="panel-body">
					<form id="minesweeperconfigform" action="" method="post" class="form-horizontal" role="form">
						<div class="form-group">
							<label class="col-md-4 col-sm-4 control-label" for="">Dimension (W x H)</label>
							<div class="col-md-4 col-sm-4">
								<input type="number" required class="form-control checkpossibleinput" name="dimensionwidth" id="dimensionwidth" placeholder="width" value="12" />
							</div>
							<div class="col-md-4 col-sm-4">
								<input type="number" required class="form-control checkpossibleinput" name="dimensionheight" id="dimensionheight" placeholder="height" value="15" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-md-4 col-sm-4 control-label" for="percentagebomb">Bombs (%)</label>
							<div class="col-md-8 col-sm-8">
								<input type="number" required min="1" max="99" class="form-control checkpossibleinput" name="percentagebomb" id="percentagebomb" placeholder="bombs" value="20" />
							</div>
						</div>
						<div class="form-group">
							<div class="col-md-offset-3 col-md-9 col-sm-offset-4 col-sm-8">
								<button id="apply" type="submit" class="btn btn-success">
									<span class="glyphicon glyphicon-ok"></span> Apply
								</button>
							</div>
						</div>
					</form>
				</div>
			</div>

			<div class="toggle-panel panel panel-default" id="minesweeper-config-panel">
				<div class="panel-heading" style="cursor:pointer;">
					<h6 class="panel-title text-right">
						<span class="glyphicon glyphicon-question-sign"></span>
					</h6>
				</div>
				<div class="panel-body">
					<div class="container">
						<div class="page-header">
							<h3>About</h3>
						</div>
						<div class="">Minesweeper <small>v.0.1.0</small> by <a href="http://www.sovoboys.net" target="_self">Sovoboys.net</a></div>
					</div>
					<div class="container">
						<div class="page-header">
							<h3>Tools</h3>
						</div>
						<ul>
							<li><a href="http://jquery.com" target="_blank" title="jQuery">jQuery</a></li>
							<li><a href="http://getbootstrap.com/" target="_blank" title="Twitter Bootstrap">Twitter Bootstrap</a></li>
							<li><a href="http://fortawesome.github.io/Font-Awesome/" target="_blank" title="Font Awesome">Fontawesome</a></li>
							<li><a href="http://chancejs.com" target="_blank" title="chance.js">chance.js</a></li>
							<li><a href="http://underscorejs.org/" target="_blank" title="underscore.js">underscore.js</a></li>
						</ul>
					</div>
				</div>
			</div>

		</div>
	</div>

</div>
table#minesweeperstage{
	width : auto !important;
	display: table;
}
table#minesweeperstage td{
	padding: 0px !important;
	width: 30px !important;
	max-width: 30px !important;
	height: 30px !important;
	max-height: 30px !important;
	overflow: hidden !important;
	text-align: center !important;
	vertical-align: middle !important;
}
table#minesweeperstage td.unknowncell, table#minesweeperstage td.flagcell, table#minesweeperstage td.cluecell{
	transition: background-color .5s;
	cursor: pointer !important;
	background-color: #AAAAAA;
	box-shadow: inset 2px 2px 2px 0px rgba(255, 255, 255, 0.3);
	-moz-box-shadow: inset 2px 2px 2px 0px rgba(255, 255, 255, 0.3);
	-webkit-box-shadow: inset 2px 2px 2px 0px rgba(255, 255, 255, 0.3);
}
table#minesweeperstage td.unknowncell:hover, table#minesweeperstage td.flagcell:hover, table#minesweeperstage td.cluecell:hover{
	background-color: #BBBBBB;
}
table#minesweeperstage td.flagcell, table#minesweeperstage td.cluecell, table#minesweeperstage td.bombcell, table#minesweeperstage td.bombanscell{
	position: relative;
	display: table-cell;
	font-family: 'Glyphicons Halflings';
	font-style: normal;
	font-weight: 400;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
table#minesweeperstage td.flagcell{color: #91A;}
table#minesweeperstage td.flagcell:before{content: '\e034';}
table#minesweeperstage td.cluecell{color: #333;}
table#minesweeperstage td.cluecell:before{content: '\e085';}
table#minesweeperstage td.bombcell{
	color : #FF0 !important;
	background-color: #BB1111 !important;
	font-size: 20px !important;
}
table#minesweeperstage td.bombcell:before, table#minesweeperstage td.bombanscell:before{content: '\e124';}
table#minesweeperstage td.bombanscell.rightcell:after{content: '\e013';}
table#minesweeperstage td.knowncell, table#minesweeperstage td.bombcell{
	box-shadow: inset 2px 2px 2px 0px rgba(0, 0, 0, 0.14);
	-moz-box-shadow: inset 2px 2px 2px 0px rgba(0, 0, 0, 0.14);
	-webkit-box-shadow: inset 2px 2px 2px 0px rgba(0, 0, 0, 0.14);
}
table#minesweeperstage td.knowncell{
	cursor: default !important;
	background-color: #EEEEEE;
	font-weight: bolder;
	font-size: 20px;
}
table#minesweeperstage td.bombanscell{
	color : #D00;
	background-color: #EEBB11;
	font-size: 16px;
}
table#minesweeperstage td.bombanscell.rightcell{
	font-size: 10px !important;
	color : #0A0;
}
table#minesweeperstage td.knowncell_1{color : #11C;}
table#minesweeperstage td.knowncell_2{color : #181;}
table#minesweeperstage td.knowncell_3{color : #1AA;}
table#minesweeperstage td.knowncell_4{color : #666;}
table#minesweeperstage td.knowncell_5{color : #91A;}
table#minesweeperstage td.knowncell_6{color : #48C;}
table#minesweeperstage td.knowncell_7{color : #D91;}
table#minesweeperstage td.knowncell_8{color : #C11;}
table#minesweeperstage td.knowncell_1:before{content: '1';}
table#minesweeperstage td.knowncell_2:before{content: '2';}
table#minesweeperstage td.knowncell_3:before{content: '3';}
table#minesweeperstage td.knowncell_4:before{content: '4';}
table#minesweeperstage td.knowncell_5:before{content: '5';}
table#minesweeperstage td.knowncell_6:before{content: '6';}
table#minesweeperstage td.knowncell_7:before{content: '7';}
table#minesweeperstage td.knowncell_8:before{content: '8';}