-
QT编写的C++贪吃蛇小游戏
游戏通过按键控制
部分代码:
#include "gamewidget.h"
#define ROW 13
#define COL 16
#define UP 0
#define DOWN 1
#define LEFT 2
#define RIGHT 3
GameWidget::GameWidget(QWidget *parent)
:QWidget(parent)
{
this->setAutoFillBackground(true);//覆盖
this->resize(480,270);
this->setWindowIcon(QIcon("img/icon.jpg"));
this->setWindowTitle("贪吃蛇");
QPalette palette;
palette.setBrush(QPalette::Background,QBrush((QPixmap)"img/bjt.png"));
this->setPalette(palette);
//按扭区
leftbtn=new QPushButton(this);
leftbtn->setIcon((QIcon)"img/zuo.png");
leftbtn->setIconSize(QSize(40,40));
leftbtn->setGeometry(QRect(340,180,40,40));
leftbtn->setFlat(true);
rightbtn=new QPushButton(this);
rightbtn->setIcon((QIcon)"img/you.png");
rightbtn->setIconSize(QSize(40,40));
rightbtn->setGeometry(QRect(430,180,40,40));
rightbtn->setFlat(true
- 2022-03-21 19:09:00下载
- 积分:1
-
a)需求分析:
任务 :对一篇英文文章,统计各字符出现的次数,实现Huffman编码;
要求:输出每个字符出现的次数和编码,其中求最小权值要求用堆实现;...
a)需求分析:
任务 :对一篇英文文章,统计各字符出现的次数,实现Huffman编码;
要求:输出每个字符出现的次数和编码,其中求最小权值要求用堆实现;
b)概要设计:
本程序所使用的数据结构是树和线性表,所使用的算法主要有堆排序、赫夫曼算法。
-a) Requirements Analysis : Mandate : an article in English, statistics of the number of characters to achieve Huffman coding; Requirements : Every character in the output of the number and the code for which the minimum requirement of the right to use Heap; B) Summary of design : the procedures used by the data nodes the tree structure and linear form, the algorithm used by the main sculpture, in order Huffman algorithm.
- 2022-03-06 12:21:16下载
- 积分:1
-
这是另外一个WCF服务发布和客户端利用的例子,提供给初学者学习...
这是另外一个WCF服务发布和客户端利用的例子,提供给初学者学习-This is another one WCF service delivery and client use an example provided to the beginners to learn
- 2022-02-14 14:24:57下载
- 积分:1
-
该源码讲了vc++对acess数据库的操作
该源码讲了vc++对acess数据库的操作-The source said a vc++ for the operation of the database acess
- 2022-06-02 08:55:47下载
- 积分:1
-
图像处理中SSE的应用
SSE – Streaming SIMD Extension,是Intel从PIII开始加入的一种x86扩展指令集。在SSE以前,x86的浮点运算都是以栈式FPU完成的,有一定x86汇编经验的人应该不会对那些复杂的fld、fst指令陌生吧。而SSE一方面让浮点运算可以像整数运算的模式、如 add eax , ebx 那样通过直接访问寄存器完成,绕开了讨厌的栈,另一方面引入了SIMD这个概念。SIMD – Single
Instruction Multiply Data,顾名思义,它可以同时让一条指令在多个数据上执行,这种
- 2022-02-09 16:46:15下载
- 积分:1
-
服务 客户端 socket
服务端为win32服务程序, 用cmd命令安装 jrserver -i 或 jrserver -u删除,客户端与服务端采用socket连接,
客户端用配置文件保存服务器端口和地址和登录账号,服务装在其他电脑上需配置IP,服务端可以连接sql数据库,需要修改连接字符
- 2022-03-19 20:12:41下载
- 积分:1
-
一个国产RPG游戏 详细讲解RPG游戏的开发过程,还有源码,全是Win32的,大家一起学一下吧!...
一个国产RPG游戏 详细讲解RPG游戏的开发过程,还有源码,全是Win32的,大家一起学一下吧!-a homemade RPG elaborate on the development process, source code, all of the Win32, we learn together about!
- 2022-06-30 01:02:48下载
- 积分:1
-
realtek562x系列驱动源码。wince,xscale平台。可轻松移植到其他arm平台下。...
realtek562x系列驱动源码。wince,xscale平台。可轻松移植到其他arm平台下。-realtek562x series driver source code. wince, xscale platform. Can be easily ported to other platforms under the arm.
- 2022-01-26 01:09:40下载
- 积分:1
-
使用Java RMI的功能,这一过程需要稳定的音符……
用于javarmi的函数使用,可以说明了解进程
- 2023-07-29 19:05:03下载
- 积分:1
-
VB找图
VB实现简单快速的找图找色, 对初学找图找色的新手有较大的帮助。
- 2023-08-08 18:25:02下载
- 积分:1