資源簡介
Qt掃雷小程序
代碼片段和文件信息
#include?
#include?
#include?“game_model.h“
GameModel::GameModel()
????:?mRow(kRow)
??????mCol(kCol)
??????totalMineNumber(kMineCount)
??????timerSeconds(kTime)
??????gameState(PLAYING)
{
????//?在構造函數里面不做具體初始化,因為構造函數的調用時間不確定
}
GameModel::~GameModel()
{
}
void?GameModel::createGame(int?row?int?col?int?mineCount?GameLevel?level)
{
????//?先清空已經有的游戲地圖
????gameMap.clear();
????//?設置成員變量
????mRow?=?row;
????mCol?=?col;
????totalMineNumber?=?mineCount;
????curMineNumber?=?mineCount;
????gameState?=?PLAYING;
????gameLevel?=?level;
????timerSeconds?=?0;
????//?初始化雷方塊
????for(int?i?=?0;?i?????{
????????//添加每行的block
????????std::vector?lineBlocks;
????????for(int?j?=?0;?j?????????{
????????????MineBlock?mineBlock;
????????????mineBloc
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-07-08?02:00??QtMineSweep-master\
?????文件?????????453??2016-07-08?02:00??QtMineSweep-master\QtMineSweep.pro
?????文件???????23882??2016-07-08?02:00??QtMineSweep-master\QtMineSweep.pro.user
?????文件?????????496??2016-07-08?02:00??QtMineSweep-master\README.md
?????文件????????5405??2016-07-08?02:00??QtMineSweep-master\game_model.cpp
?????文件????????1663??2016-07-08?02:00??QtMineSweep-master\game_model.h
?????文件?????????182??2016-07-08?02:00??QtMineSweep-master\main.cpp
?????文件????????8657??2016-07-08?02:00??QtMineSweep-master\main_game_window.cpp
?????文件?????????954??2016-07-08?02:00??QtMineSweep-master\main_game_window.h
?????文件????????1747??2016-07-08?02:00??QtMineSweep-master\maingamewindow.ui
?????目錄???????????0??2016-07-08?02:00??QtMineSweep-master\pic\
?????文件????????8997??2016-07-08?02:00??QtMineSweep-master\pic\1.PNG
?????文件???????10341??2016-07-08?02:00??QtMineSweep-master\pic\2.PNG
?????文件???????11912??2016-07-08?02:00??QtMineSweep-master\pic\3.PNG
?????文件???????11727??2016-07-08?02:00??QtMineSweep-master\pic\4.PNG
?????文件????????8342??2016-07-08?02:00??QtMineSweep-master\pic\5.PNG
?????文件???????24510??2016-07-08?02:00??QtMineSweep-master\pic\game.gif
?????目錄???????????0??2016-07-08?02:00??QtMineSweep-master\res\
?????文件???????15654??2016-07-08?02:00??QtMineSweep-master\res\blocks.bmp
?????文件????????6966??2016-07-08?02:00??QtMineSweep-master\res\faces.bmp
?????文件???????32054??2016-07-08?02:00??QtMineSweep-master\res\fr
?????文件???????16854??2016-07-08?02:00??QtMineSweep-master\res\timenumber.bmp
?????文件?????????203??2016-07-08?02:00??QtMineSweep-master\resource.qrc
- 上一篇:QT+opencv打開RTSP視頻流多線程
- 下一篇:Qt5開發及隨書源代碼.rar
評論
共有 條評論