thinker.h

来自「巫魔问题求解」· C头文件 代码 · 共 45 行

H
45
字号
#pragma once
#include <vector>
#include "ClientMap.h"


namespace _algorithm
{
    class WorldModel;
    class Thinker
    {
    public:
        //constructor and destructor
        Thinker(WorldModel &wm);
        ~Thinker(void);

    private:
        //disable copy constructor
        Thinker(const Thinker &from);

    public:
        //think, judge the types of cells
        void Think(void);

        //references
        WorldModel &TheWorldModel(void);
        const WorldModel &GetWorldModel(void) const;

    protected:
        //backtracking method, first consider one cell has a specified type, then try to deny the assumption, finally get the result
        bool ThinkCore(int i,
                       std::vector<unsigned int> &suspect_type);
        
        //backtraking method
        bool InnerThink(ClientMap &spcm,
                        std::vector<_base::Cell*> &suspect_list,
                        std::vector<unsigned int> &suspect_type,
                        unsigned int depth);
        //judge whether a map is rational
        bool JudgeMap(ClientMap &spcm);

    protected:
        WorldModel *mpWorldModel;
    };
}

⌨️ 快捷键说明

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