贪吃蛇小游戏的开发与设计摘要 贪吃蛇小游戏是一款大家都比较熟悉的小游戏,每个人基本都玩过,实现游戏的关键就是要构建好贪吃蛇在游戏界面中上下左右移动的框架,这样就比较容易的开发好这款小游戏。在本次毕业设计当中,我的题目是贪吃蛇小游戏的开发与设计。在这个设计当中所用的工具为 eclipse,在设计之初,通过对这款游戏的技术可行性和经济可行性进行了分析,了解了用户对这款小游戏的基本需求,我主要是通过创建了五个 java 类来实现贪吃蛇的一些功能,通过创建食物类实现了食物的构建和食物不断刷新位置的功能,通过贪吃蛇类实现了贪吃蛇的构造和蛇头切换功能,通过界面类实现了游戏界面的设置,通过框架类实现了窗体的大小和出现消失功能。其次,在这款小游戏中加上了音乐功能,主要是通过设置 music 函数,start 函数,stop 函数来实现音乐这个功能,使玩家在玩游戏的同时可以享受音乐。关键字 游戏 java 贪吃蛇 食物 类Development and design of snake gameAbstract Snake game is a small game that everyone is familiar with. Everyone has played it. The key to realizing the game is to build a frame for snake to move up and down in the game interface, this is relatively easy to develop this small game. In this graduation project, my topic is the greedy snake small game development and the design. In this design, the tool used for eclipse, in the early design of the game through the technical feasibility and economic feasibility analysis, understand the user's basic needs for this small game, i basically created five Java classes to implement some of the functions of greedy snake, and created a food class to build and refresh the food's location, the structure of snake and the function of snake head switch are realized by snake, the game interface is set by interface class, and the form size and vanishing function are realized by frame class. Secondly, in this small game added music function, mainly by setting music function, start function...