On the. NET platform, compile a small game (Program + detailed documentation + Source Code) that uses algorithms to walk through the maze)

Source: Internet
Author: User

This little game was designed for a programming competition this year.CodeControl your Explorer to go out of the map.

There are many elements in the map, such as doors, switches, transfer points, etc. players need to determine these elements and combinations to successfully exit the maze.

At present, the development kit contains more than maps for your entertainment

Of course, you can also use the built-in map generator to generate maps for students or colleagues.Algorithm.

The development package contains the most classic left and right wall detection algorithms to help you understand computer algorithms, especially when creating relevant courseware, educators can provide students with the most direct understanding.

 

Currently, I have come up with a more interesting method:

Put your own and your opponent's algorithms into a special maze, and use the various organs in the map to close the opponent into a dark room before escaping from the maze.

(Since I have been on a business trip for a long time, many interesting ideas have not been realized, such as gold coins)

Below are some

1. Even if no Visual Studio is available, you can directly enter the code to run it.

 

 

2. Select your algorithm and create an explorer

 

 

3. Use the following maze algorithm to walk out of the blank maze

 

 

A simple maze algorithm
1 Using System;
2 Using Grapecity. Competition. Maze;
3
4 Namespace Mazesample
5 {
6 Public   Class Leftandupai: imazeai
7 {
8 Void Imazeai. Think (imaze maze, iexplorer Explorer)
9 {
10 Int Steps;
11 Do
12 {
13 Steps = Explorer. steps;
14 Explorer. Move (direction. Left );
15 Explorer. Move (direction. Up );
16 }   While (Explorer. Steps ! = Steps ); // Exit the algorithm if it cannot be moved.
17 }
18
19 Void Imazeai. Hear ( String Name, String Message, Object Information)
20 {
21}
22
23 Void Imazeai. initialize ()
24 {
25}
26
27 Void Imazeai. Terminate ()
28 {
29}
30 }
31 }

 

Download Related Materials

1. Development Kit and related documents: http://files.cnblogs.com/e2tox/MazeClient-bin.zip

2. mazeclientSource codeDownload: http://files.cnblogs.com/e2tox/MazeClient-src.zip

3. Development Guide download (giant details): http://files.cnblogs.com/e2tox/MazeClient-readme.zip

 

3. mazeclient QQ group (optional ):22782300

 

If anyone is interested in improving this game or adding new features, contact me: QQ 119141, indicating: mazeclient

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.