'. '

MineSweeper

From APIDesign

(Difference between revisions)
Jump to: navigation, search
(MineSweeper Sources)
Line 14: Line 14:
<source lang="bash">
<source lang="bash">
-
$ hg clone http://source.apidesign.org/hg/html~demo/
+
$ git clone https://github.com/jtulach/minesweeper
-
$ cd html~demo/
+
$ cd minesweeper
-
$ hg up -C b9726ab22a9b
+
$ mvn install
-
$ mvn install -DskipTests
+
$ cd client-netbeans
-
$ cd minesweeper/
+
$ mvn clean package nbm:cluster nbm:run-platform -Dnetbeans.version=dev-SNAPSHOT
-
$ mvn -Pnbrwsr install
+
-
# generates target/target/minesweeper-2.3-SNAPSHOT.nbm
+
</source>
</source>
-
and the system generates an NBM ([[NetBeans]] module file) which can be installed into your [[NetBeans]]! Give it a try and let's make [[NetBeans]] better by using more [[DukeScript]] [[API]]s! Don't forget that you can package the same application to run on [[Android]], [[IBrwsr|iOS]] or in a [[Bck2Brwsr|browser]]. Become a developer that can: Write once, run anywhere!
+
and stats [[NetBeans Platform]] application with [[MineSweeper]] module in. Give it a try and let's make [[NetBeans]] better by using more [[DukeScript]] [[API]]s! Don't forget that you can package the same application to run on [[Android]], [[IBrwsr|iOS]] or in a [[Bck2Brwsr|browser]]. Become a developer that can: Write once, run anywhere!

Revision as of 16:18, 2 October 2015

MineSweeper is re-implementation of classical computer game available on each Microsoft Windows since the initial introduction in version 3.1. Surprisingly my kids (who otherwise spend hours with tablets) knew nothing about the game until...

I needed a demonstration for DukeScript technology that is using Java to code the application logic and HTML to render its UI. I decided to write a MineSweeper game as a basic demo. I've managed to execute the demo in a browser (via Bck2Brwsr VM: check it on-line) and Android (available on GooglePlay), and iOS (available on AppStore), but today I achieved another milestone: the MineSweeper module is available for every user of NetBeans 8.0!

Get the module via Tools/Plugins or visit its plugin page and enjoy your productivity boost! Since Sep 15, 2014 the MineSweeper NetBeans integration can be used as a starting point to develop own DukeScript applications. Just press the Develop button and a new project wizard will be shown as following picture shows:

Image:MineSweeperDevelop.png

Then follow the steps as described at DukeScriptInNetBeans or CRUD video.

MineSweeper Sources

In case you are interested in trying the code yourself, here is a way to get the sources:

$ git clone https://github.com/jtulach/minesweeper
$ cd minesweeper
$ mvn install
$ cd client-netbeans
$ mvn clean package nbm:cluster nbm:run-platform -Dnetbeans.version=dev-SNAPSHOT

and stats NetBeans Platform application with MineSweeper module in. Give it a try and let's make NetBeans better by using more DukeScript APIs! Don't forget that you can package the same application to run on Android, iOS or in a browser. Become a developer that can: Write once, run anywhere!

Personal tools
buy