资源简介
1. 使用APPGAMEKIT游戏引擎,C++语言编写的UNO牌游戏。
2. 运行程序 文件目录下 Final/Template.exe
3. 运行代码 文件目录下 Template.sln 请使用VS2010打开
4. 打开Template.exe可能会弹框,按确定即可运行。
5. 游戏引擎为试用版,请不要用于商业用途。
7. 没有多少注释。
8. 当前版本为1.0,预计以后会加上的功能:challenge,电脑AI等。
代码片段和文件信息
#include “Card.h“
Card::Card(){
this->color = “ “;
this->numOrFunction = ““;
}
Card::Card(unsigned int spriteIndex){
divideName2ColorAndNF(spriteIndex);
}
Card::Card(string colorstring numOrFunction){
this->color = color;
this->numOrFunction = numOrFunction;
}
void Card::init(string colorstring numOrFunction){
this->color = color;
this->numOrFunction = numOrFunction;
}
string Card::getNameFromSpriteIndex(unsigned int spriteIndex){
return sm.getNameFromSpriteIndex(spriteIndex);
}
void Card::attainColorAndNumOrFunction(string& nameint pos){
this->color = name.substr(0pos);
this->numOrFunction = name.substr(posname.length()-pos);
}
/*
Color: back Blue Green Red Yellow Wild
NumOrFunction: Mod 0123456789 DownPour1 DownPour2 Draw2 Reverse Skip Draw4 ““
*/
void Card::divideName2ColorAndNF(unsigned int spriteIndex){
string name = this->getNameFromSpriteIndex(spriteIndex);
switch(name[0]){
case ‘b‘://4 3
//Mod
this->attainColorAndNumOrFunction(name4);
break;
case ‘B‘://4
//0123456789 Draw2 Reverse Skip
this->attainColorAndNumOrFunction(name4);
break;
case ‘G‘://5
//0123456789 Draw2 Reverse Skip
this->attainColorAndNumOrFunction(name5);
break;
case ‘R‘://3
//0123456789 Draw2 Reverse Skip
this->attainColorAndNumOrFunction(name3);
break;
case ‘Y‘://6
//0123456789 Draw2 Reverse Skip
this->attainColorAndNumOrFunction(name6);
break;
case ‘W‘://4
//DownPour1 DownPour2 Draw4 ““
this->attainColorAndNumOrFunction(name4);
break;
default:
break;
};
}
string Card::getColor(){
return this->color;
}
string Card::getNumOrFunction(){
return this->numOrFunction;
}
bool operator ==(Card& aCard& b)
{
return (a.getColor() == b.getColor()) && (a.getNumOrFunction() == b.getNumOrFunction());
}
bool Card::isEmpty(){
if(this->color==“ “ && this->numOrFunction==““){
return true;
}
return false;
}
void Card::resetNumOrFunction(){
this->numOrFunction = ““;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
..A..H. 22016 2016-04-16 08:56 UNO -verson1.0 无challnege版本\.vs\Template\v14\.suo
文件 2025 2016-04-13 22:59 UNO -verson1.0 无challnege版本\Card.cpp
文件 621 2016-04-13 20:19 UNO -verson1.0 无challnege版本\Card.h
文件 303 2016-04-14 17:59 UNO -verson1.0 无challnege版本\CardDepthManager.cpp
文件 325 2016-04-14 17:59 UNO -verson1.0 无challnege版本\CardDepthManager.h
文件 3445 2016-04-14 22:06 UNO -verson1.0 无challnege版本\ChangeColorW10.cpp
文件 448 2016-04-14 17:59 UNO -verson1.0 无challnege版本\ChangeColorW10.h
....... 1 2009-08-31 02:32 UNO -verson1.0 无challnege版本\ClassDiagram1.cd
文件 18920 2015-08-01 15:38 UNO -verson1.0 无challnege版本\Core.cpp
文件 5254 2015-08-01 17:27 UNO -verson1.0 无challnege版本\Debug\cl.command.1.tlog
文件 131346 2015-08-01 17:27 UNO -verson1.0 无challnege版本\Debug\CL.read.1.tlog
文件 1810 2015-08-01 17:27 UNO -verson1.0 无challnege版本\Debug\CL.write.1.tlog
文件 346292 2015-08-01 17:27 UNO -verson1.0 无challnege版本\Debug\Core.obj
文件 2 2015-08-01 17:27 UNO -verson1.0 无challnege版本\Debug\li
文件 2 2015-08-01 17:27 UNO -verson1.0 无challnege版本\Debug\li
文件 2 2015-08-01 17:27 UNO -verson1.0 无challnege版本\Debug\li
文件 3316 2015-08-01 17:27 UNO -verson1.0 无challnege版本\Debug\rc.command.1.tlog
文件 8814 2015-08-01 17:27 UNO -verson1.0 无challnege版本\Debug\rc.read.1.tlog
文件 2062 2015-08-01 17:27 UNO -verson1.0 无challnege版本\Debug\rc.write.1.tlog
文件 3552 2015-08-01 15:38 UNO -verson1.0 无challnege版本\Debug\RCa07428
文件 2 2015-08-01 15:38 UNO -verson1.0 无challnege版本\Debug\Template.exe.em
文件 68 2015-08-01 17:27 UNO -verson1.0 无challnege版本\Debug\Template.exe.em
文件 69 2015-08-01 17:27 UNO -verson1.0 无challnege版本\Debug\Template.lastbuildstate
文件 2231 2015-08-01 17:27 UNO -verson1.0 无challnege版本\Debug\Template.log
文件 318416 2015-08-01 17:27 UNO -verson1.0 无challnege版本\Debug\template.obj
文件 34240 2015-08-01 17:27 UNO -verson1.0 无challnege版本\Debug\template.res
文件 0 2015-08-01 17:27 UNO -verson1.0 无challnege版本\Debug\Template.unsuccessfulbuild
文件 206 2015-08-01 15:38 UNO -verson1.0 无challnege版本\Debug\Template_manifest.rc
文件 226091 2015-10-30 15:18 UNO -verson1.0 无challnege版本\Final\images\bg.jpg
文件 195448 2016-04-08 13:44 UNO -verson1.0 无challnege版本\Final\images\cards\backMod.png
............此处省略149个文件信息
相关资源
- C++虚拟数字键盘 源代码 可扩展
- DEV_C++ 6.0233251
- 提高C++性能的编程技术 中文 PDF 非扫
- 《Effective C++中文版》&《Essential C++中
- 南华大学@USC2019春季学期C++程序设计实
- bm3d图像去噪算法C++代码
- C++运用opencv进行二维多张全景图拼接
- C++程序设计语言 揣锦华
-
C++与ja
vasc ript交互 - C++高级网络编程经典的C++网络编程书
- The Art of Scientific Computing第二版、第三
- 基于QT的小型OA-ERP系统(源码1)
- C++ How to Program 10th.pdf
- C++语言的设计与演化超高清版_科学出
- Effective C++:改善程序与设计的55个具
- VC++ 实现绘制波形图动态图
- 高仿的Win7扫雷程序
- BM3DC++代码
- 网络编程简单聊天室
- 浏览器截屏程序源代码C++
- C++课程实践飞机大战基于easyx图形库
- Visual C++游戏开发技术与书与随书光盘
- 网络编程C++ MFC获取MAC地址
- C语言游戏编程从入门到精通PDF书及源
- C++验证码识别
- C++预装驱动工程源码
- 人力资源管理系统visual c++6.0 +SQL Ser
- 人力资源管理系统基于Visual C++
- c++STL基础及应用
- 面向对象程序设计 旅店管理系统
评论
共有 条评论