"141029" VC game to solve the shortest path algorithm in the code source

Source: Internet
Author: User

VC game to solve the shortest path algorithm in the source code, this example is the auto path-finding demonstration, the basket point is the starting point, the red dot is the end, press the OK key to start.  Source enthusiasts note: After compiling, please copy the exe file from the debug directory to the project root directory, if it will be wrong.
authoring, Programming: Tong Ming
Program Order:

Initialize the queue, the pending node into the queue, rely on the destination valuation distance into the sorting, the estimated nearest scenario from the destination out of the queue, release the top node, free all the requested nodes, the evaluation function, the value of x, y to the destination distance, the estimate must be less than the actual value, try to move to X, y feasible no, If there ever was a better way to move to (x, Y) failure, record this time to (x, y) distance as the best distance in history ...


Game Source: Click to download

"141029" VC game to solve the shortest path algorithm in the code source

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.