-
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
-
职工管理系统,实现了查询,界面设计,数据库的连接!
职工管理系统,实现了查询,界面设计,数据库的连接!-Staff management system, the realization of the query, interface design, database connectivity!
- 2022-08-26 05:21:56下载
- 积分:1
-
vb,结束指定进程,api结束进程,api进程处理
vb,结束指定进程,api结束进程,api进程处理-vb,kill process
- 2023-07-19 23:50:03下载
- 积分:1
-
在tcl中绘制随时间变化的图形.该源程序需要其他程序配合使用....
在tcl中绘制随时间变化的图形.该源程序需要其他程序配合使用.-In tcl Drawing graphics over time. The source code need to use with other programs.
- 2023-05-18 13:35:03下载
- 积分:1
-
This the sorce code in Visual Basic 6 for the data logging in Excel.
This the sorce code in Visual Basic 6 for the data logging in Excel. -This is the sorce code in Visual Basic 6 for the data logging in Excel.
- 2022-01-26 02:41:26下载
- 积分:1
-
Batch job scheduling problem, with VC++ Realize, code can be directly run
批处理作业调度问题,用VC++ 实现,代码可直接运行,-Batch job scheduling problem, with VC++ Realize, code can be directly run
- 2022-04-14 18:08:48下载
- 积分:1
-
这是我的图书馆借阅管理系统,简单实用,适合学习VC++者学习,也可实际应用...
这是我的图书馆借阅管理系统,简单实用,适合学习VC++者学习,也可实际应用-This is my library management system, simple and practical learning for VC++ learning, but also practical applications
- 2022-03-14 11:24:26下载
- 积分:1
-
这个matlab7.0的瑞利衰落信道信号的产生
这个matlab7.0的瑞利衰落信道信号的产生-This matlab7.0 the Rayleigh fading channel signals generated
- 2022-02-06 01:44:22下载
- 积分:1
-
酒店管理系统 .net开发 带源代码
更有大量源代码交流
酒店管理系统 .net开发 带源代码
更有大量源代码交流-hotel management system. Net source code developed with a lot more source code sharing
- 2022-03-20 07:53:11下载
- 积分:1
-
考虑一个排队系统,顾客到达后,若无空闲服务台则等待,否则接受服务后离开,仿真目的是统计服务台前的平均队长和服务台的忙闲程度。要求能利用离散事件系统仿真的方法对该...
考虑一个排队系统,顾客到达后,若无空闲服务台则等待,否则接受服务后离开,仿真目的是统计服务台前的平均队长和服务台的忙闲程度。要求能利用离散事件系统仿真的方法对该系统进行仿真,系统的规则和参数自定。-Consider a queuing system, customers arrive, if not idle while waiting for help desk, or to accept service leave, simulation aim is to stage the average statistical services and help desk captain Busy extent. Requested to make use of discrete event system simulation approach the system simulation, system rules and parameters of self.
- 2023-07-09 02:50:03下载
- 积分:1