C-language simple version tank war

Source: Internet
Author: User

    1.地图。用一个二维数组。所有的打印都在数组里有对应的值。

2. User Tank. Enemy tanks. Bullet. are written separately in a file.
3. User Tank. Have some of their own methods. Move. Initialize the tank. Create tanks. Print. Clean. Change direction. Determine the health value. Determine if you can move. and decide if it's near home.
4. Enemy tanks. Same as the user. They can also be moved automatically. Turn.
5. Bullets (with a health value. Not meet the requirements of life is false. Used repeatedly between enemy tanks. )。 Here are the separate. Split the user with the enemy bullets. With sub-
6 Do not save with an array. The corresponding method has. Collision detection. Initialize the bullets (all false). Create (here is the judgment.) Whether the build is within range. If the tank encounters an obstacle). Clean. Move (using the whole array movement). Print bullets. Determine if it's near home.
6.home testing is never available.
7. Implement on obstacles. The tanks were different through.
8. The realization in the grass tank can be under the grass.
9. You can customize the grass and obstacles on the original basis. You can now change home to grass or obstacles.
10. The idea is to finish all enemy victory. Failed to achieve Victory page.
11. If the user tank is hit by an enemy tank, there is no health value. Exits the program. (Bullet box GG)

C-language simple version tank war

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.