锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久只有这里有精品4,国产欧美久久一区二区,精品久久久久久久无码http://m.shnenglu.com/lostboy123/archive/2011/08/15/153435.html灝忛椀灝忛椀Mon, 15 Aug 2011 06:27:00 GMThttp://m.shnenglu.com/lostboy123/archive/2011/08/15/153435.htmlhttp://m.shnenglu.com/lostboy123/comments/153435.htmlhttp://m.shnenglu.com/lostboy123/archive/2011/08/15/153435.html#Feedback1http://m.shnenglu.com/lostboy123/comments/commentRss/153435.htmlhttp://m.shnenglu.com/lostboy123/services/trackbacks/153435.html
// strategy.cpp : 瀹氫箟鎺у埗鍙板簲鐢ㄧ▼搴忕殑鍏ュ彛鐐廣?/div>
//
#include "stdafx.h"
/********************************************************************
created: 2011/08/15
created: 15:8:2011   10:37
file base: strategy
file ext: cpp
author: lost boy
purpose: 璁捐妯″紡-絳栫暐妯″紡
絳栫暐妯″紡鏄寚瀹氫箟涓緋誨垪鐨勭畻娉曪紝鎶婂畠浠竴涓釜灝佽璧鋒潵錛屽茍涓斾嬌瀹冧滑鍙浉浜掓浛鎹€?/div>
鏈ā寮忎嬌寰楃畻娉曞彲鐙珛浜庝嬌鐢ㄥ畠鐨勫鎴瘋屽彉鍖栥備篃灝辨槸璇磋繖浜涚畻娉曟墍瀹屾垚鐨勫姛鑳戒竴鏍鳳紝
瀵瑰鐨勬帴鍙d竴鏍鳳紝鍙槸鍚勮嚜瀹炵幇涓婂瓨鍦ㄥ樊寮傘傜敤絳栫暐妯″紡鏉ュ皝瑁呯畻娉曪紝鏁堟灉姣旇緝濂姐?/div>
*********************************************************************/
/*
鐢佃剳鎴樻湳
*/
class BotsTactics
{
public:
virtual void DoTactics() = 0;
};
/*
鍚歸嫻?/div>
*/
class TacticsBlown : public BotsTactics
{
public:
void DoTactics()
{
printf("bot use Blown tactics\n");
}
};
/*
鐔婃祦
*/
class TacticsBears : public BotsTactics
{
public:
void DoTactics()
{
printf("bot use Bears tactics\n");
}
};
/*
濉旀祦
*/
class TacticsTowerRush : public BotsTactics
{
public:
void DoTactics()
{
printf("bot use TowerRush tactics\n");
}
};
/*
涔熸槸鐩存帴閫氳繃鍙傛暟鎸囧畾錛屽彧涓嶈繃涓嶆槸浼犲叆鎸囬拡錛岃屾槸涓涓爣絳俱?/div>
鐢ㄦ埛鍙渶瑕佺煡閬撴爣絳?/div>
*/
enum TATICS {BLOWN, BEAR, TR}; //鏍囩  
class Bots
{
private:
BotsTactics *pTatics_;
public:
Bots(enum TATICS ta)
{
if (ta == BLOWN)
pTatics_ = new TacticsBlown;
else if(ta == BEAR)
pTatics_ = new TacticsBears;
else if (ta == TR)
pTatics_ = new TacticsTowerRush;
else
pTatics_ = NULL;
}
~Bots()
{
if (pTatics_)
{
delete pTatics_;
pTatics_ = NULL;
}
};
public:
void DoTactics()
{
pTatics_->DoTactics();
}
};
/*
鍒╃敤妯℃澘瀹炵幇銆傜畻娉曢氳繃妯℃澘鐨勫疄鍙傛寚瀹氥?/div>
*/
template<class ta>
class templateBots
{
private:
ta ta_;
public:
templateBots(){}
~templateBots(){}
public:
void DoTactics()
{
ta_.DoTactics();
}
};
int _tmain(int argc, _TCHAR* argv[])
{
Bots bot(BLOWN);
bot.DoTactics();
templateBots<TacticsTowerRush> bot1;
bot1.DoTactics();
return 0;
}


灝忛椀 2011-08-15 14:27 鍙戣〃璇勮
]]> 亚洲国产二区三区久久| 久久一本综合| 99久久人妻无码精品系列蜜桃 | 国产午夜精品理论片久久| 99久久国产综合精品成人影院| 久久人人爽人爽人人爽av| 久久久精品国产免大香伊 | 超级碰久久免费公开视频| 99精品国产免费久久久久久下载| 狠狠干狠狠久久| 7777久久久国产精品消防器材| 国产视频久久| 亚洲精品国精品久久99热一| 久久精品国产亚洲7777| 99久久人妻无码精品系列 | 性欧美丰满熟妇XXXX性久久久 | 亚洲精品午夜国产VA久久成人| 成人国内精品久久久久影院| 久久伊人中文无码| 久久国产乱子伦精品免费强| 伊人久久大香线蕉亚洲| 婷婷久久综合九色综合九七| 91精品国产91久久| 四虎国产精品免费久久久| 久久人爽人人爽人人片AV| 国内精品伊人久久久影院| 久久久久国产日韩精品网站| 亚洲狠狠久久综合一区77777| 久久久一本精品99久久精品88 | 久久久亚洲精品蜜桃臀| 99久久伊人精品综合观看| 日本免费久久久久久久网站| 丰满少妇人妻久久久久久| 久久亚洲国产成人精品性色| 久久久久久久久久久久久久| 欧美无乱码久久久免费午夜一区二区三区中文字幕 | 99久久无色码中文字幕| 久久国产亚洲高清观看| 日韩久久久久久中文人妻| 久久精品国产清高在天天线| 久久精品aⅴ无码中文字字幕重口|