C # snake games-conception (1)

Source: Internet
Author: User

Greedy? Many people are most familiar with this game. Today, we will try this little game. When you are bored, you can still find some fun! :)

A simple Snake Game mainly includes two objects: Snake and food.

Snake:

As we all know, a snake crawls, eats, grows, and dies. These are the basic members of a snake, including its characteristics, for example, length, movement direction, speed, and so on; and the behavior of snakes, the snakes will crawl and die, and the display of snakes (draw.

Food:

The food class is relatively simple, mainly because of the display and disappearance of food. If the food class is extended, some types of food can be defined, for example, it is not surprising that after a snake eats, the length of food, slow food, accelerated food, reverse, and an obstacle appear. If you love it, add any function.

Game rules:

Control the snake to eat the food on the screen, eat longer, hit the walls or obstacles to death! That's easy!

The basic object already exists, and it is still the same. In addition to Logic Operation Judgment + loop, a small game is born again!

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.