• 大小: 23.25MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-23
  • 语言: C/C++
  • 标签: C++  UNO  游戏  AGK  

资源简介

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\link.command.1.tlog

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

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

     文件       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.embed.manifest

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

     文件         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个文件信息

评论

共有 条评论