説明を見る。00001
00002
00003 #include "osl/rating/group/bigramGroup.h"
00004 #include <sstream>
00005
00006 std::string osl::rating::BigramAttackGroup::name(bool same, bool focus_x)
00007 {
00008 std::ostringstream ss;
00009 ss << "BigramA" << (same ? '=' : '!') << (focus_x ? 'X' : 'Y');
00010 return ss.str();
00011 }
00012
00013 osl::rating::BigramAttackGroup::BigramAttackGroup(bool s, bool f)
00014 : Group(name(s, f)), same(s), focus_x(f)
00015 {
00016 for (int x=-2; x<=2; ++x) {
00017 for (int y=-2; y<=2; ++y) {
00018 for (int x2=-2; x2<=2; ++x2) {
00019 for (int y2=-2; y2<=2; ++y2) {
00020 for (int king=0; king<5; ++king) {
00021 push_back(new BigramAttack(x, y, x2, y2, king, same, focus_x));
00022 }
00023 }
00024 }
00025 }
00026 }
00027 }
00028
00029 int osl::rating::BigramAttackGroup::findMatch(const NumEffectState& state, Move move, const RatingEnv& env) const
00030 {
00031 const int index = BigramAttack::index(state, move, env, same, focus_x);
00032 return index;
00033 }
00034
00035
00036
00037
00038
00039