基于qt的俄罗斯方块的设计与实现.doc

  1. 1、本文档共70页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
基于qt的俄罗斯方块的设计与实现

内 容 摘 要 俄罗斯方块是个比较经典的小游戏,它实现由四块正方形的色块组成,然后存储在一个数组的四个元素中,计算机随机产生不同七种类型的方块,根据计算机定时器控制它在一定的时间不停的产生,用户根据键盘的四个方向键控制翻转、向左、向右和向下操作,(用信号和槽函数的关联来实现对按键事件的控制)。然后程序根据这七种方块堆叠成各种不同的模型。本设计大体分以下三部分: 第一部分是简介,用基本方法实现自己的俄罗斯方块游戏,介绍游戏的基本概况及要实现的功能。第二部分是功能演示,验证游戏可否按预想方案运行,验证运行流畅度,图形界面的美观度。第三部分是代码分析,这里将展示整个游戏编程代码及接口函数。 本次设计用到的工具是基于UBUNTU下的QT软件,图行界面的处理都是代码实现。 关 键 词 数组;定时器;信号;槽函数;QT Design and implementation of Tetris, based on the QT Name:iwenbo Teacher:angyiqin 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 interface processing is code to achieve. Key words array; cell function; timer; signal;Qt 目 录 引言 - 1 - 第一部分 简介 - 3 - 1.1游戏功能 - 3 - 1.2 游戏界面与控制 - 3 - 1.2.1游戏窗口 - 3 - 1.2.2方块形状 - 4 - 1.2.3键盘处理事件 - 4 - 1.2.4显示需求 - 4 - 第二部分 功能展示 - 5 - 2.1 打开游戏 - 5 - 2.2 进入游戏 - 6 - 2.3游戏过关 - 6 - 2.4 游戏暂停 - 7 - 2.5 游戏退出 - 8 - 第三部分 代码分析 - 8 - 3.1 Tetrix工程 - 8 - 3.2 tetrixboard.h - 9 - 3.3 tetrixpiece.h - 10 - 3.4 tetrixwindow.h - 11 - 3.5 main.cpp - 12 - 3.6 tetrixpiece.cpp - 13 - 3.7 tetrixwindow.cpp - 14 - 3.7.1 显示框 - 14 - 3.7.2 功能按钮 - 15 - 3.7.3 信号与槽 - 16 - 3.7.4 游戏面板布局 - 16 -

文档评论(0)

gz2018gz + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档