applyhint.cpp
来自「爱因斯坦谜题」· C++ 代码 · 共 38 行
CPP
38 行
// ApplyHint.cpp: implementation of the CApplyHint class.
//
//////////////////////////////////////////////////////////////////////
#include "ApplyHint.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CApplyHint::CApplyHint()
{
m_hint_set = false;
}
void CApplyHint::ApplyHint(const CSolution &sln, CSolutionSet &output)
{
sln.ApplyHint(m_hint, output);
}
void CApplyHint::Apply(const CSolutionSet &input, CSolutionSet &output)
{
if (!m_hint_set) {
return;
}
int in_cnt = input.GetSize();
for (int i=0; i<in_cnt; i++) {
ApplyHint(input.GetAt(i), output);
}
}
void CApplyHint::SetHint(CHint hint)
{
m_hint = hint;
m_hint_set = true;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?