A browser-run Huarong, "Move XV", such as slider game Automatic solution and demo of the GWT source code

Source: Internet
Author: User

First, the concept of GWT is popular.

Gwt:google WEB Toolkit, with GWT being able to write AJAX front-end in the Java programming language, and then GWT will cross-compile into optimized JavaScript, and JavaScript will automatically run on all major browsers.

(can be simply interpreted as Java to write programs, compiled into JavaScript, run to the browser.) )


Huarong Road, "Move XV" such as the slider game, in common is that each slider can move up and down, each square can be any number of small square composition. (Another kind of slider game, is the slider can only be n*1 horizontal bar or 1*n vertical strip, horizontal slider can only move horizontally, vertical bar slider can only move up and down.) )

Take a look at the running screenshots in Chrome:

First with the mouse to draw the initial board layout, a single independent small box only need to click a lattice, the composite box with the mouse drag across multiple lattice.
This is the original chessboard that draws out the Huarong DAO transverse knife immediately closes.
The drawback is that several small squares of synthetic squares are only the same color, not visually fused into a whole block.

Click Next, set the target status, and drag the target box to the target location.
Huarong game, is to move the devil to the bottom of the exit.

The next step, you will begin the calculation of the solution.

Well, the results come out, click Forward, back to demonstrate each step of the way.
Go, go, it becomes.
The result of this program is the minimum number of steps to move the solution, each move a grid to calculate one step.
So the horizontal knife is immediately 116 steps, not 81 steps (each move a square regardless of a few squares to calculate one step). [Run the page here: Sliding block puzzle solver]--[SOURCE download here: Sliding-block-solver-v1.1.zip]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.