undodata.h

来自「c+++ game uploading now」· C头文件 代码 · 共 30 行

H
30
字号
/**
 @file
 A definition of a datastructure used to store undo data.
*/
#if !defined _UNDODATA__H_
#define _UNDODATA__H_
#include "Boards.h"

namespace Othello
{

    /**
     data structure to hold info about how a move must be undone in the
     expanded board representation. Altough I could have encapsuleted this
     in the MoveExecuter, it would have not been as efficient as a weak
     (pointer, or reference based) encapsulation, so it is neccessary to 
     have this structure defined separatly. */
    struct UndoData
    {

        squarevalue* Prev[32]; /**< pointers to the squares modified */
        unsigned int count;    /**< number of squares modified */
        UndoData()
            :count(0)
        {}
    };
}
#endif //_UNDODATA__H_

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?