Java Virtal Machine.net

[ News ] rss

February 01, 2011

Mark Wielaard: New GPG key. Finally created a new GPG key using gnupg. The old one was a DSA/1024 bits one and 8 years old. The new one is a RSA/2048 bits one. I will use the new one in the future to sign any release tarballs I might create. pub 2048R/57816A6A 2011-01-29 Key f...

More »

February 01, 2011

Andrew Hughes: [SECURITY] IcedTea6 1.7.8, 1.8.5, 1.9.5 Released!. We are pleased to announce a new set of security releases, IcedTea6 1.7.8, IcedTea6 1.8.5 and IcedTea6 1.9.5. This update contains the following security updates: The IcedTea project provides a harness to build the source code from OpenJDK6 u...

More »

April/2024
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
282930    

[ Archives News
for 'Java Technology' ]

home > news > java technology > real multi-threading in javafx

Real multi-threading in JavaFX

I developed my first implementation of the Reversi game on BASIC 20 years ago. Since then, I ported it on each programming language I studied: Turbo Pascal with graphics library and Turbo Vision, C with the Windows API, C++ with the ClanLib, Java AWT applet, and Swing application with Java2D. Now I am ready to publish yet another implementation, on JavaFX Script. javafx({ name: "Reversy", width: 400, height: 450, archive: "https://malenkov.dev.java.net/20100813/Reversy.jar" }); This game allows to compete with one of the algorithms as well as to see how these algorithms compete with each other. The Sergey algorithm is based on the Minimax algorithm with a simple table of game piece weights where the calculation depth is 6. The Pavel algorithm is developed by my colleague, and I have got it from the official JavaFX site. But I had to add the following constructor: public Board(GameBoard board) { this(); Object dark = board.getFriend(); Object light = board.getEnemy(); int pos = 11; for (int y = 0; y < 8; y++, pos += 2) { for (int x = 0; x < 8; x++, pos++) { Object piece = board.getPiece(x, y); this.data[pos] = (piece == dark) ? PIECE_DARK : (piece == light) ? PIECE_LIGHT : PIECE_EMPTY; } } this.movePiece = PIECE_DARK; prepareMoves(); } When I increased the calculation depth, I disc...


Date: August, 13 2010
Url: http://www.java.net/blog/malenkov/archive/2010/08/13/real-multi-threading-javafx


Others News

©2002-2019Java-Virtual-Machine.net free web design software | website designer | Mobirise Templates | Free Bootstrap Template | icon font