-
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
-
ColoredListCtrl的实例,VC关于list control控件的代码
ColoredListCtrl的实例,VC关于list control控件的代码
- 2023-04-23 08:35:03下载
- 积分:1
-
是ppt关于c语言的
是ppt关于c语言的-ppt is the language of the c
- 2023-07-27 21:15:03下载
- 积分:1
-
灌溉机械的论坛,在规定的时间间隔一二灌溉,…
论坛灌水机器
1、在指定时间间隔灌水一次
2、灌水后马上返回原来激活窗口,不影响原来工作
3、模拟鼠标、键盘输入-a forum for irrigation machinery, in a specified time interval a two irrigation, water immediately after activation to return to the original window, without affecting the original work of three simulated mouse, keyboard
- 2022-06-16 00:35:22下载
- 积分:1
-
【国际程序设计大赛作品】,看看强人的杰作
【国际程序设计大赛作品】,看看强人的杰作-International Programming Contest 【】 works, look at the strongman" s masterpiece! ! !
- 2023-02-10 06:50:04下载
- 积分:1
-
IE风格的编辑框
IE风格的编辑框-IE-style editing Box
- 2023-08-17 05:05:03下载
- 积分:1
-
are classic operating system replacement pages of LRU algorithm simulation progr...
是经典的操作系统中页面置换中的LRU算法模拟程序源代码-are classic operating system replacement pages of LRU algorithm simulation program source code
- 2023-03-07 18:20:03下载
- 积分:1
-
航空管理软件
通过目标输入雷达经纬度和雷达的高度
计算目标的x,y的位置...
航空管理软件
通过目标输入雷达经纬度和雷达的高度
计算目标的x,y的位置-Aviation management software through the target latitude and longitude input radar and radar target height calculation of the x, y position
- 2022-07-20 16:13:35下载
- 积分:1
-
Knn识别手写数字
knn识别手写数字,里面有详细的代码注释,具体讲述了利用knn算法,kNN算法的核心思想是如果一个样本在特征空间中的k个最相邻的样本中的大多数属于某一个类别,则该样本也属于这个类别,并具有这个类别上样本的特性。该方法在确定分类决策上只依据最邻近的一个或者几个样本的类别来决定待分样本所属的类别。
kNN方法在类别决策时,只与极少量的相邻样本有关。由于kNN方法主要靠周围有限的邻近的样本,而不是靠判别类域的方法来确定所属类别的,因此对于类域的交叉或重叠较多的待分样本集来说,kNN方法较其他方法更为适合。
- 2023-03-29 15:05:04下载
- 积分:1
-
圈子圈套1 讲IT界商战故事的小说,作者乃一业界小牛,讲述着自己或他人的故事...
圈子圈套1 讲IT界商战故事的小说,作者乃一业界小牛,讲述着自己或他人的故事-story of business of IT
- 2023-02-03 21:25:03下载
- 积分:1