⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 thinker.h

📁 巫魔问题求解
💻 H
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -