資源簡介
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個文件信息
評論
共有 條評論