1.1 --- a/minesweeper/src/main/java/org/apidesign/demo/minesweeper/MinesModel.java Sat Feb 08 06:23:40 2014 +0100
1.2 +++ b/minesweeper/src/main/java/org/apidesign/demo/minesweeper/MinesModel.java Sat Feb 08 06:36:06 2014 +0100
1.3 @@ -97,6 +97,10 @@
1.4 model.init(10, 10, 10);
1.5 }
1.6
1.7 + @Function static void giveUp(Mines model) {
1.8 + showAllBombs(model, SquareType.EXPLOSION);
1.9 + }
1.10 +
1.11 @ModelOperation static void init(Mines model, int width, int height, int mines) {
1.12 List<Row> rows = new ArrayList<Row>(height);
1.13 for (int y = 0; y < height; y++) {
2.1 --- a/minesweeper/src/main/webapp/pages/index.html Sat Feb 08 06:23:40 2014 +0100
2.2 +++ b/minesweeper/src/main/webapp/pages/index.html Sat Feb 08 06:36:06 2014 +0100
2.3 @@ -41,14 +41,9 @@
2.4 <body>
2.5 <div class="navbar">
2.6 <div class="navbar-inner">
2.7 - <a id="apptitle" class="brand" href="#">Mines for Java & HTML</a>
2.8 - <button class="btn btn-default navbar-btn" data-bind="click: smallGame">Play 5x5</button>
2.9 - <button class="btn btn-default navbar-btn" data-bind="click: normalGame">Play 10x10</button>
2.10 - <ul class="nav">
2.11 - <li >
2.12 - <a href="http://html.java.net">A demo of an HTML/Java rendering technology.</a>
2.13 - </li>
2.14 - </ul>
2.15 + <a id="apptitle" class="brand" href="http://html.java.net">Mines for Java & HTML</a>
2.16 + <button class="btn btn-default navbar-btn" data-bind="click: normalGame">New Game!</button>
2.17 + <button class="btn btn-default navbar-btn" data-bind="click: giveUp ">Show Mines!</button>
2.18 </div>
2.19 <!-- Collect the nav links, forms, and other content for toggling -->
2.20 <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">