C++ UNO牌游戏 - version 1.0


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版本.vsTemplatev14.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版本Debugcl.command.1.tlog

     文件     131346  2015-08-01 17:27  UNO -verson1.0  无challnege版本DebugCL.read.1.tlog

     文件       1810  2015-08-01 17:27  UNO -verson1.0  无challnege版本DebugCL.write.1.tlog

     文件     346292  2015-08-01 17:27  UNO -verson1.0  无challnege版本DebugCore.obj

     文件          2  2015-08-01 17:27  UNO -verson1.0  无challnege版本Debuglink.command.1.tlog

     文件          2  2015-08-01 17:27  UNO -verson1.0  无challnege版本Debuglink.read.1.tlog

     文件          2  2015-08-01 17:27  UNO -verson1.0  无challnege版本Debuglink.write.1.tlog

     文件       3316  2015-08-01 17:27  UNO -verson1.0  无challnege版本Debug
c.command.1.tlog

     文件       8814  2015-08-01 17:27  UNO -verson1.0  无challnege版本Debug
c.read.1.tlog

     文件       2062  2015-08-01 17:27  UNO -verson1.0  无challnege版本Debug
c.write.1.tlog

     文件       3552  2015-08-01 15:38  UNO -verson1.0  无challnege版本DebugRCa07428

     文件          2  2015-08-01 15:38  UNO -verson1.0  无challnege版本DebugTemplate.exe.embed.manifest

     文件         68  2015-08-01 17:27  UNO -verson1.0  无challnege版本DebugTemplate.exe.embed.manifest.res

     文件         69  2015-08-01 17:27  UNO -verson1.0  无challnege版本DebugTemplate.lastbuildstate

     文件       2231  2015-08-01 17:27  UNO -verson1.0  无challnege版本DebugTemplate.log

     文件     318416  2015-08-01 17:27  UNO -verson1.0  无challnege版本Debug emplate.obj

     文件      34240  2015-08-01 17:27  UNO -verson1.0  无challnege版本Debug emplate.res

     文件          0  2015-08-01 17:27  UNO -verson1.0  无challnege版本DebugTemplate.unsuccessfulbuild

     文件        206  2015-08-01 15:38  UNO -verson1.0  无challnege版本DebugTemplate_manifest.rc

     文件     226091  2015-10-30 15:18  UNO -verson1.0  无challnege版本Finalimagesg.jpg

     文件     195448  2016-04-08 13:44  UNO -verson1.0  无challnege版本FinalimagescardsackMod.png

............此处省略149个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)