説明を見る。00001
00002
00003 #include "osl/rating/ratingEnv.h"
00004 #include "osl/rating/feature/king8.h"
00005 #include "osl/effect_util/sendOffSquare.h"
00006 #include "osl/progress/effect5x3.h"
00007
00008 void osl::rating::
00009 RatingEnv::update(const NumEffectState& new_state, Move last_move)
00010 {
00011 history.push(last_move);
00012 make(new_state);
00013 }
00014
00015 void osl::rating::
00016 RatingEnv::make(const NumEffectState& state,
00017 const PieceMask& my_pin, const PieceMask& op_pin, Progress16 progress)
00018 {
00019 sendoffs.clear();
00020 const Square king_position = state.kingSquare(alt(state.turn()));
00021 effect_util::SendOffSquare::find(state.turn(), state, king_position,
00022 sendoffs);
00023 this->my_pin = my_pin;
00024 this->op_pin = op_pin;
00025 this->progress = progress;
00026 attack_count_for_turn = DefenseKing8::count(state);
00027 counteffect2_cache.fill(-1);
00028 pattern_cache.fill(-1);
00029 }
00030
00031 void osl::rating::
00032 RatingEnv::make(const NumEffectState& state)
00033 {
00034 progress::Effect5x3 progress(state);
00035 make(state,
00036 state.pin(state.turn()),
00037 state.pin(alt(state.turn())),
00038 progress.progress16());
00039 }
00040
00041
00042
00043
00044
00045