資源簡介
以黑白棋為例,做的一個win32的小游戲。
壓縮包里是詳細代碼,項目是vs2010的,其他IDE請自行創建項目然后添加源文件。
詳細介紹可以參考我的博客:http://blog.csdn.net/zilaishuichina/article/details/38235313
注:代碼僅供學習交流使用,請勿用于其他用途。

代碼片段和文件信息
#include?“CList.h“
CList::CList()
{
Init();
}
CList::~CList()
{
Init();
}
void?CList::Init()
{
m_pHead?=?NULL;
m_pTail?=?NULL;
}
bool?CList::PushTail(Node&?node)
{
bool?bRes?=?false;
if?(NULL?==?node.m_pList)
{
node.m_pLast?=?m_pTail;
node.m_pNext?=?NULL;
node.m_pList?=?this;
if?(NULL?!=?m_pTail)
{
m_pTail->m_pNext?=?&node;
}
m_pTail?=?&node;
if?(NULL?==?m_pHead)
{
m_pHead?=?&node;
}
bRes?=?true;
}
return?bRes;
}
bool?CList::Remove(Node&?node)
{
bool?bRes?=?false;
if?(this?==?node.m_pList)
{
if?(m_pHead?==?&node)
{
m_pHead?=?node.m_pNext;
}
if?(m_pTail?==?&node)
{
m_pTail?=?node.m_pLast;
}
if?(NULL?!=?node.m_pNext)
{
node.m_pNext->m_pLast?=?node.m_pLast;
}
if?(NULL?!=?node.m_pLast)
{
node.m_pLast->m_pNext?=?node.m_pNext;
}
node.m_pNext?=?NULL;
node.m_pLast?=?NULL;
node.m_pList?=?NULL;
bRes?=?true;
}
return?bRes;
}
Node?*CList::GetHead()
{
return?m_pHead;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????4076??2014-08-06?09:47??game\game.cpp
?????文件????????800??2014-07-28?16:18??game\game.rc
?????文件???????1228??2014-08-06?11:21??game\game.sln
?????文件???????9117??2014-08-06?11:20??game\game.vcxproj
?????文件???????4432??2014-08-06?11:20??game\game.vcxproj.filters
?????文件????????157??2014-07-28?16:21??game\Resource.h
?????文件???????4383??2014-08-06?09:48??game\ReversiAI.cpp
?????文件???????1100??2014-08-06?11:12??game\ReversiAI.h
?????文件???????5693??2014-08-06?10:42??game\ReversiBitBoard.cpp
?????文件???????1206??2014-08-06?09:59??game\ReversiBitBoard.h
?????文件????????317??2014-07-29?14:28??game\ReversiCommon.cpp
?????文件???????2138??2014-08-06?11:12??game\ReversiCommon.h
?????文件???????1133??2014-08-06?09:48??game\ReversiPla
?????文件????????873??2014-08-06?09:47??game\ReversiPla
?????文件???????1122??2014-07-21?17:19??game\ReversiPoint.h
?????文件???????4707??2014-08-06?09:57??game\ReversiScene.cpp
?????文件???????1070??2014-08-06?09:43??game\ReversiScene.h
?????文件???????1049??2013-08-28?16:51??common\CList.cpp
?????文件????????997??2013-04-18?17:09??common\CList.h
?????文件?????????37??2013-09-02?09:25??common\CLock.cpp
?????文件????????441??2013-09-18?10:24??common\CLock.h
?????文件????????672??2014-07-19?21:18??common\TArray.h
?????文件???????1834??2014-07-19?21:18??common\TArray.hpp
?????文件???????2868??2014-07-08?17:45??common\TBDli
?????文件???????6669??2014-07-08?17:45??common\TBDli
?????文件???????2147??2014-07-17?11:00??common\TContainer.h
?????文件???????2351??2013-04-19?16:04??common\TContainer.hpp
?????文件???????1370??2013-09-18?14:32??common\TIterator.h
?????文件???????1220??2013-09-18?14:32??common\TIterator.hpp
?????文件???????1320??2013-09-23?16:49??common\Tob
............此處省略13個文件信息
評論
共有 條評論