Liu Xuan has developed another JavaFX game, LinkUp . This is a game of fun, especially for kids, and had been implemented in many languages and platform, such as flash and java.
Like in any games, visual effect and algorithms are two key elements. In this game, most of the visual effects can be easily achieved by JavaFX API(like fade in/out, animation). According to Liu, the algorithm to find two conntected cells are the hightlight of the game. A breadth-first search algorithm is used to find the shortest path. Check the code at Model.fx, there are three functions: findNoCross(),
findOneCross() and findTwoCross() implemented for this purpose. The first function finds a set of cells that can be reached by a line(directly). If the target cell is not in this set, the second function is invoked to look for cells reachable by a turn. Similarly, the third function is used for searching a path of two turns.
This program received 1 award
This software was checked for viruses and was found to be clean. Click here to see antivirus report.
trusted
DOWNLOAD
70.9 KB
Free