91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 418KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-11
  • 語言: C/C++
  • 標簽:

資源簡介

此游戲是本人在求職一家游戲公司的筆試題目。 >請仿照"北京浮生記pc版"(不知道的請自行google),編寫工作在控制臺上的程序 >要求使用c++和stl編寫,(注意不是struct+c), >盡量體現面向對象的特點,和自己的設計思想, >盡量做到邏輯代碼與程序控制代碼、輸入輸出代碼低偶合(即可以在不修改邏輯代碼的情況下從控制臺移植到win32/mfc程序上) >要求程序結構、邏輯清晰,有適當的注釋。 >請使用vs2005sp1或vs2003編譯

資源截圖

代碼片段和文件信息

//?BeiJingHell.cpp?:?定義控制臺應用程序的入口點。
//

#include?“stdafx.h“
#include?
#include?
#include?“..\BeiJingLogic\LogicTransaction.h“
#include?“..\BeiJingLogic\GoodsProperty.h“
#include?“..\BeiJingLogic\baseEventProperty.h“
#include?“..\BeiJingLogic\PersonEventProperty.h“
#include?“..\BeiJingLogic\GoodsEventProperty.h“

using?namespace?std;

void?PrintfGoods();//輸出出現在黑市的商品信息
void?PrintfEvent();//輸出發生的事件信息
void?PrintfPersonAtt();//輸出人物屬性信息
void?PrintfPersonGoods();//輸出人物商品信息
void?ChooseMenu();//主菜單
void?PrintfSpace();//進入換地方模塊
void?PrintfCenter();//進入中心控制模塊,銀行,醫院等
void?PrintfBuy();//進入買操作模塊
void?PrintfSale();//進入賣操作模塊
void?PrintfBank();//進入銀行操作模塊
void?PrintfPersonScore();//查看排名情況

enum{?kQuit?=?0?kMenu?kBuy?kSale?kSpace?kCenter?}?mode?=?kMenu;

int?_tmain(int?argc?_TCHAR*?argv[])
{
try
{
while?(?mode?)
{
if?(?kMenu?==?mode?)
{
system(?“cls“?);
ChooseMenu();
}
else?if?(?kBuy?==?mode?)
{
system(?“cls“?);
PrintfBuy();
}
else?if?(?kSale?==?mode?)
{
system(?“cls“?);
PrintfSale();
}
else?if?(?kSpace?==?mode?)
{
system(?“cls“?);
PrintfSpace();
}
else?if?(?kCenter?==?mode?)
{
system(?“cls“?);
PrintfCenter();
}
else?if?(?kQuit?==?mode?)
{
return?0;
}
}
}
catch?(?...?)
{
return?1;
}

return?0;
}

void?PrintfGoods()
{
cout?< cout?<
GoodsPropertyMap*?pAppearGoodsMap?=?CLogicTransaction::GetInstance()->GetAppearGoodsMap();

for?(?GoodsPropertyMap::iterator?itr?=?pAppearGoodsMap->begin();?itr?!=?pAppearGoodsMap->end();?itr++?)
{
CGoodsProperty*?pPrt?=?itr->second;

int?iID?=?pPrt->GetID();
std::string?strName?=?pPrt->GetName();
int?iPrice?=?pPrt->GetNowPrice();
int?iRenown?=?pPrt->GetRenown();

cout?< }

cout?<}

void?PrintfEvent()
{
cout?< EventPropertyMap*?pAppearEventMap?=?CLogicTransaction::GetInstance()->GetAppearEventMap();

if?(?!pAppearEventMap->empty()?)
{
for?(?EventPropertyMap::iterator?itr?=?pAppearEventMap->begin();?itr?!=?pAppearEventMap->end();?itr++?)
{
CbaseEventProperty*?pPrt?=?itr->second;

int?iID?=?pPrt->GetID();
std::string?strName?=?pPrt->GetName();
std::string?strAffect?=?pPrt->GetAffect();

cout?< }
}

cout?<}

void?PrintfPersonAtt()
{
cout?<
CPersonAttribute*?pPersonAtt?=?CLogicTransaction::GetInstance()->GetPersonAtt();

int iCash?=?pPersonAtt->GetCash();//現金
int iSaving?=?pPersonAtt->GetSaving();//存款
int iDebt?=?pPersonAtt->GetDebt();//負債
int iHealth?=?pPersonAtt->GetHealth();//健康指數
int iRenown?=?pPersonAtt->GetRenown();//名聲指數

cout?<

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件?????966656??2009-05-14?22:32??北京浮生記PC版\BeiJing.mdb

?????文件??????15590??2009-05-14?20:21??北京浮生記PC版\BeiJingHell\BeiJingHell.cpp

????..A..H.??????9728??2009-05-11?22:08??北京浮生記PC版\BeiJingHell\BeiJingHell.suo

?????文件???????4576??2009-05-14?21:42??北京浮生記PC版\BeiJingHell\BeiJingHell.vcproj

?????文件???????1422??2009-05-14?22:32??北京浮生記PC版\BeiJingHell\BeiJingHell.vcproj.UESOFT1.ue85.user

?????文件????????974??2009-05-11?21:54??北京浮生記PC版\BeiJingHell\ReadMe.txt

?????文件????????214??2009-05-12?22:30??北京浮生記PC版\BeiJingHell\stdafx.cpp

?????文件????????270??2009-05-13?08:04??北京浮生記PC版\BeiJingHell\stdafx.h

?????文件?????716800??2009-05-14?22:32??北京浮生記PC版\BeiJingHell.exe

?????文件???????1372??2009-05-14?12:18??北京浮生記PC版\BeiJingHell.sln

????..A..H.?????84480??2009-05-14?22:32??北京浮生記PC版\BeiJingHell.suo

?????文件????????528??2009-05-13?13:25??北京浮生記PC版\BeiJingLogic\baseEventProperty.cpp

?????文件???????1296??2009-05-14?21:15??北京浮生記PC版\BeiJingLogic\baseEventProperty.h

?????文件????????494??2009-05-13?23:54??北京浮生記PC版\BeiJingLogic\baseProperty.cpp

?????文件???????1286??2009-05-14?21:15??北京浮生記PC版\BeiJingLogic\baseProperty.h

?????文件????????355??2009-05-14?12:17??北京浮生記PC版\BeiJingLogic\BeiJingLogic.cpp

?????文件???????5808??2009-05-14?21:42??北京浮生記PC版\BeiJingLogic\BeiJingLogic.vcproj

?????文件???????1379??2009-05-14?22:32??北京浮生記PC版\BeiJingLogic\BeiJingLogic.vcproj.UESOFT1.ue85.user

?????文件??????10222??2009-05-14?21:15??北京浮生記PC版\BeiJingLogic\DatabaseTransaction.cpp

?????文件????????884??2009-05-14?21:15??北京浮生記PC版\BeiJingLogic\DatabaseTransaction.h

?????文件????????584??2009-05-14?00:27??北京浮生記PC版\BeiJingLogic\GoodsEventProperty.cpp

?????文件???????1083??2009-05-14?21:15??北京浮生記PC版\BeiJingLogic\GoodsEventProperty.h

?????文件???????1351??2009-05-14?21:15??北京浮生記PC版\BeiJingLogic\GoodsProperty.cpp

?????文件???????1535??2009-05-14?21:15??北京浮生記PC版\BeiJingLogic\GoodsProperty.h

?????文件???????3110??2009-05-14?21:15??北京浮生記PC版\BeiJingLogic\LogicShare.h

?????文件??????24715??2009-05-14?21:15??北京浮生記PC版\BeiJingLogic\LogicTransaction.cpp

?????文件???????2368??2009-05-14?21:15??北京浮生記PC版\BeiJingLogic\LogicTransaction.h

?????文件???????3963??2009-05-14?21:15??北京浮生記PC版\BeiJingLogic\PersonAttribute.cpp

?????文件???????2033??2009-05-14?21:15??北京浮生記PC版\BeiJingLogic\PersonAttribute.h

?????文件????????518??2009-05-13?13:25??北京浮生記PC版\BeiJingLogic\PersonEventProperty.cpp

............此處省略13個文件信息

評論

共有 條評論

相關資源