Beijiao learning Example 5: classic Snake games (source code)

Source: Internet
Author: User

Looking back at the study in beijiao, the most expected thing is the day of every project PK. After each learning phase, everyone writes a game project based on their knowledge. Then, they take turns to go on stage to explain the technology and implementation ideas used by their game projects, and then let other students try it out, finally, the instructor commented, and everyone scored to see which game is most popular. When a game is affirmed by others, it is a sense of accomplishment for beginners. I remember that the first three project PK games were proposition games: on the console, number guesses on the advanced interface, and greedy snakes on the low-level canvas. After, I will sort out the online version and paste it out. It is just the if judgment to guess the number, and I will not introduce it again. The greedy snake is a very classic game, because of its simple logic, simple operation, and concise picture, it has been used as a basic learning project for getting started with games.

RepeatCodeSort out the optimization and add some comments, and debug it on your Nokia 6120c. The operations include adding icons and logos, optimizing food generation and collision methods, drawing strings automatically with line breaks, and adjusting the text position on the screen.

I miss the days when I was playing games, killing people, and killing people with Xiaoyue, Muzi, laoban, zzh, and Qiuqiu. I sorted out these game projects that I made at the time and hoped that I could help beginners in addition to the happy and full learning experience.

PS: some images are from the Internet and used directly in the game or after some processing. If there is any infringement, please let us know.

 

Preview:

 

Code is relatively more, do not paste out, attached (including source code, resource images and jar package): http://download.csdn.net/source/1595990

 

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.