1.1 --- a/minesweeper/pom.xml Thu Apr 24 12:37:28 2014 +0200
1.2 +++ b/minesweeper/pom.xml Fri Apr 25 12:55:40 2014 +0200
1.3 @@ -4,7 +4,7 @@
1.4
1.5 <groupId>org.apidesign.demo</groupId>
1.6 <artifactId>minesweeper</artifactId>
1.7 - <version>1.0-SNAPSHOT</version>
1.8 + <version>2.0-SNAPSHOT</version>
1.9 <packaging>jar</packaging>
1.10 <parent>
1.11 <artifactId>demo</artifactId>
1.12 @@ -13,7 +13,15 @@
1.13 </parent>
1.14
1.15 <name>Mine Sweeper</name>
1.16 -
1.17 + <description>
1.18 + Demonstration of DukeScript rendering technology.
1.19 + Plus old, good, simple and entertaining game.
1.20 + Improve your coding skills by playing a game and
1.21 + meanwhile learn what a rendering technology of the
1.22 + future is going to look like. Learn to use DukeScript:
1.23 + Write once, display (and deploy) anywhere!
1.24 + </description>
1.25 + <url>http://html.java.net/</url>
1.26 <properties>
1.27 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1.28 <brwsr.startpage>pages/index.html</brwsr.startpage>
1.29 @@ -33,30 +41,6 @@
1.30 </plugin>
1.31 <plugin>
1.32 <groupId>org.apache.maven.plugins</groupId>
1.33 - <artifactId>maven-resources-plugin</artifactId>
1.34 - <version>2.6</version>
1.35 - <executions>
1.36 - <execution>
1.37 - <id>copy-resources</id>
1.38 - <!-- here the phase you need -->
1.39 - <phase>process-resources</phase>
1.40 - <goals>
1.41 - <goal>copy-resources</goal>
1.42 - </goals>
1.43 - <configuration>
1.44 - <outputDirectory>${basedir}/target/classes/org/apidesign/demo/minesweeper/</outputDirectory>
1.45 - <resources>
1.46 - <resource>
1.47 - <directory>src/main/webapp/</directory>
1.48 - <filtering>true</filtering>
1.49 - </resource>
1.50 - </resources>
1.51 - </configuration>
1.52 - </execution>
1.53 - </executions>
1.54 - </plugin>
1.55 - <plugin>
1.56 - <groupId>org.apache.maven.plugins</groupId>
1.57 <artifactId>maven-jar-plugin</artifactId>
1.58 <version>2.4</version>
1.59 <configuration>
1.60 @@ -133,6 +117,20 @@
1.61 <build>
1.62 <plugins>
1.63 <plugin>
1.64 + <groupId>org.apache.maven.plugins</groupId>
1.65 + <artifactId>maven-jar-plugin</artifactId>
1.66 + <version>2.4</version>
1.67 + <configuration>
1.68 + <archive>
1.69 + <manifest>
1.70 + <mainClass>${project.mainclass}</mainClass>
1.71 + <addClasspath>true</addClasspath>
1.72 + <classpathPrefix>lib/</classpathPrefix>
1.73 + </manifest>
1.74 + </archive>
1.75 + </configuration>
1.76 + </plugin>
1.77 + <plugin>
1.78 <artifactId>maven-assembly-plugin</artifactId>
1.79 <version>2.4</version>
1.80 <executions>
1.81 @@ -172,6 +170,20 @@
1.82 <build>
1.83 <plugins>
1.84 <plugin>
1.85 + <groupId>org.apache.maven.plugins</groupId>
1.86 + <artifactId>maven-jar-plugin</artifactId>
1.87 + <version>2.4</version>
1.88 + <configuration>
1.89 + <archive>
1.90 + <manifest>
1.91 + <mainClass>${project.mainclass}</mainClass>
1.92 + <addClasspath>true</addClasspath>
1.93 + <classpathPrefix>lib/</classpathPrefix>
1.94 + </manifest>
1.95 + </archive>
1.96 + </configuration>
1.97 + </plugin>
1.98 + <plugin>
1.99 <groupId>org.apidesign.bck2brwsr</groupId>
1.100 <artifactId>bck2brwsr-maven-plugin</artifactId>
1.101 <version>${bck2brwsr.version}</version>
1.102 @@ -489,7 +501,7 @@
1.103 <configuration>
1.104 <useOSGiDependencies>true</useOSGiDependencies>
1.105 <brandingToken>html4j4nb</brandingToken>
1.106 - <cluster>html4j4nb</cluster>
1.107 + <cluster>extra</cluster>
1.108 <verifyIntegrity>false</verifyIntegrity>
1.109 </configuration>
1.110 </execution>
1.111 @@ -501,7 +513,7 @@
1.112 </goals>
1.113 <configuration>
1.114 <useOSGiDependencies>true</useOSGiDependencies>
1.115 - <cluster>html4j4nb</cluster>
1.116 + <cluster>extra</cluster>
1.117 <verifyIntegrity>false</verifyIntegrity>
1.118 </configuration>
1.119 </execution>
2.1 --- a/minesweeper/src/main/java/org/apidesign/demo/minesweeper/MinesModel.java Thu Apr 24 12:37:28 2014 +0200
2.2 +++ b/minesweeper/src/main/java/org/apidesign/demo/minesweeper/MinesModel.java Fri Apr 25 12:55:40 2014 +0200
2.3 @@ -193,6 +193,8 @@
2.4 if (!emptyHidden) {
2.5 model.setState(GameState.WON);
2.6 showAllBombs(model, SquareType.DISCOVERED);
2.7 + AudioClip applause = AudioClip.create("applause.wav");
2.8 + applause.play();
2.9 }
2.10 }
2.11
2.12 @@ -231,7 +233,6 @@
2.13 }
2.14 }
2.15
2.16 - private static AudioClip TOUCH;
2.17 @Function static void click(Mines model, Square data) {
2.18 if (model.getState() != GameState.IN_PROGRESS) {
2.19 return;
2.20 @@ -242,11 +243,11 @@
2.21 if (data.isMine()) {
2.22 showAllBombs(model, SquareType.EXPLOSION);
2.23 model.setState(GameState.LOST);
2.24 + AudioClip oops = AudioClip.create("oops.wav");
2.25 + oops.play();
2.26 } else {
2.27 - if (TOUCH == null) {
2.28 - TOUCH = AudioClip.create("move.mp3");
2.29 - }
2.30 - TOUCH.play();
2.31 + AudioClip touch = AudioClip.create("move.mp3");
2.32 + touch.play();
2.33 expandKnown(model, data);
2.34 model.computeMines();
2.35 }
3.1 Binary file minesweeper/src/main/webapp/pages/applause.wav has changed
4.1 --- a/minesweeper/src/main/webapp/pages/index.html Thu Apr 24 12:37:28 2014 +0200
4.2 +++ b/minesweeper/src/main/webapp/pages/index.html Fri Apr 25 12:55:40 2014 +0200
4.3 @@ -126,7 +126,7 @@
4.4 our documentation.
4.5 </p>
4.6 <p><a class="btn btn-default"
4.7 - target="_blank" href="http://bits.netbeans.org/html+java/0.7.6/"
4.8 + target="_blank" href="http://bits.netbeans.org/html+java/"
4.9 role="button">Read more »</a></p>
4.10 </div>
4.11 <div class="col-md-4">
5.1 Binary file minesweeper/src/main/webapp/pages/oops.wav has changed
6.1 --- a/pom.xml Thu Apr 24 12:37:28 2014 +0200
6.2 +++ b/pom.xml Fri Apr 25 12:55:40 2014 +0200
6.3 @@ -13,7 +13,7 @@
6.4 </parent>
6.5 <properties>
6.6 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
6.7 - <net.java.html.version>0.7.6</net.java.html.version>
6.8 + <net.java.html.version>0.8</net.java.html.version>
6.9 <bck2brwsr.version>0.8.1</bck2brwsr.version>
6.10 <teavm.version>0.1</teavm.version>
6.11 <license>COPYING</license>