摘 要:贪食蛇作为一款经典易操作的游戏,一直受到人们的青睐。本论文实现了该游戏的基本功能,并增加了保存功能:即用户在任意时刻都可以保存游戏,并在任意时间继续游戏的上次操作。针对游戏特点设计精灵类CSnake和背景类Background,分别封装蛇的各种操作和背景地图的生成与刷新。系统采用双缓冲技术去掉闪烁。系统基于Visual C++ 6.0开发平台,使用面向对象的分析和设计方法。
关键词:贪食蛇游戏;双缓冲;类设计4891
Design of the Snake Game
Abstract: Snake is a classic and easy operation game, it is favored by people.The paper realizes the basic functions of the game, and increases storage function: users can save the game at any time, and continue to the last game at any time. The game designs CSnake wizard class and Background class, respectively generate snake various operations and generation and refresh of background map. The system adopts the double buffering technology to remove flicker. The system uses the object-oriented analysis and design method based on Visual C++ 6 development platform.
Key Words: Snake Game; Double Buffering; Class Design
目 录