内 容 摘 要
俄罗斯方块是个比较经典的小游戏,它实现由四块正方形的块组成,然后存储在一个数组的四个元素中,计算机随机产生不同七种类型的方块,根据计算机定时器控制它在一定的时间不停的产生,用户根据键盘的四个方向键控制翻转、向左、向右和向下操作,(用信号和槽函数的关联来实现对按键事件的控制)。然后程序根据这七种方块堆叠成各种不同的模型。本设计大体分以下三部分:
第一部分是简介,用基本方法实现自己的俄罗斯方块游戏,介绍游戏的基本概况及要实现的功能。第二部分是功能演示,验证游戏可否按预想方案运行,验证运行流畅度,图形界面的美观度。第三部分是代码分析,这里将展示整个游戏编程代码及接口函数。
本次设计用到的工具是基于UBUNTU下的QT软件,图行界面的处理都是代码实现。
关 键 词
 
数组;定时器;信号;槽函数;QT
Design and implementation of Tetris, based on the QT
Name:Yiwenbo          Teacher:Wangyiqin
Abstract
    Tetris is a classic game, it consists of four square blocks of color, and then stored in an array of four elements, the computer randomly generated box of the seven types, according to the computer timer control it stop to produce a certain amount of time, according to the four directions of the keyboard keys to control flip, left, right and down operation (signal and slot functions associated with control of key events). The program then based on these seven box stacked into a variety of different models. This design is generally divided into the following three parts: The first part is the introduction to the basic methods to achieve their own game of Tetris. The second part is the functional demonstration; verify that the game please run the desired program. The third part is the game analysis, will show the entire game programming code and an excuse to function. The design tool used is based on the QT under UBUNTU software, the graph line interfac
e processing is code to achieve.
Key words
array;  cell function;  timer;  signal;Qt

>改变button按钮的形状

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。