osl::progress::Effect5x3WithBonus Struct Reference

`#include <effect5x3.h>`

Inheritance diagram for osl::progress::Effect5x3WithBonus:

## Public Member Functions

| Effect5x3WithBonus (const NumEffectState &state)
const Progress16 | progress16bonus (Player p) const
void | update (const NumEffectState &new_state, Move last_move)
Effect5x3WithBonus | expect (const NumEffectState &state, Move move) const
int | countEffectPieces (const NumEffectState &state, Player attack) const
const PieceMask | effect5x3Mask (Player p) const
template<osl::Player Defense>
osl::PieceMask | makeEffectMask (const NumEffectState &state)
Public Member Functions inherited from osl::progress::Effect5x3
| Effect5x3 (const NumEffectState &state)
void | changeTurn ()
int | progress (Player p) const
const Progress16 | progress16 () const
const Progress16 | progress16 (Player p) const
Effect5x3 | expect (const NumEffectState &state, Move move) const
void | update (const NumEffectState &new_state, Move last_move)

## Static Public Member Functions

template<Player Attack>
static int | makeProgressAreaBonus (const NumEffectState &state, Square king)
template<Player Attack, bool AlwaysPromotable, bool AlwaysNotPromotable>
static int | makeProgressAreaBonus (const NumEffectState &state, Square king, Square center)
Static Public Member Functions inherited from osl::progress::Effect5x3
static void | updateStand (int &old_stand, Move last_move)
static int | makeProgressAll (Player defense, const NumEffectState &state, Square king)
static int | makeProgressArea (Player attack, const NumEffectState &state, Square king)
static int | makeProgressStand (Player attack, const NumEffectState &state)
static int | makeProgress (Player defense, const NumEffectState &state)
| 王の位置を指定したprogressの計算.
static int | makeProgress (const NumEffectState &state)
static const Progress16 | progress16 (int progress)
| 0-15 の値を返す
static const Progress16 | progress16each (int progress)
| 0-15 の値を返す.

## Private Member Functions

void | updateProgressBonuses (const NumEffectState &state, bool black=true, bool white=true)
void | updateStand (Player pl, Move m)

## Static Private Member Functions

static int | attackEffect3 (const NumEffectState &state, Player attack, Square target)
template<Player Defense>
static PieceMask | makeEffectMask (const NumEffectState &state)

## Private Attributes

CArray< int, 2 > | progress_bonuses
CArray< PieceMask, 2 > | effect_mask

## Additional Inherited Members

Protected Attributes inherited from osl::progress::Effect5x3
CArray< int, 2 > | progresses
CArray< int, 2 > | stand_progresses
CArray< int, 2 > | area_progresses

## Detailed Description

Definition at line 88 of file effect5x3.h.

## Constructor & Destructor Documentation

## Effect5x3WithBonus()

osl::progress::Effect5x3WithBonus::Effect5x3WithBonus | ( | const NumEffectState & | state | ) |

explicit

Definition at line 112 of file effect5x3.cc.

References osl::BLACK, osl::progress::Effect5x3::Effect5x3(), effect_mask, osl::SimpleState::kingSquare(), makeEffectMask(), makeProgressAreaBonus(), progress_bonuses, updateProgressBonuses(), and osl::WHITE.

Referenced by expect().

## Member Function Documentation

## attackEffect3()

int osl::progress::Effect5x3WithBonus::attackEffect3 | ( | const NumEffectState & | state,
|  | Player | attack,
|  | Square | target )

inline static private

Definition at line 147 of file effect5x3.cc.

References osl::alt(), osl::NumEffectState::countEffect(), osl::Piece::isOnBoardByOwner(), and osl::SimpleState::pieceAt().

Referenced by makeProgressAreaBonus().

## countEffectPieces()

int osl::progress::Effect5x3WithBonus::countEffectPieces | ( | const NumEffectState & | state,
|  | Player | attack ) const

Definition at line 363 of file effect5x3.cc.

References osl::alt(), osl::container::PieceMask64::countBit(), effect5x3Mask(), and osl::NumEffectState::piecesOnBoard().

Referenced by updateProgressBonuses().

## effect5x3Mask()

const PieceMask osl::progress::Effect5x3WithBonus::effect5x3Mask | ( | Player | p | ) | const

inline

Definition at line 107 of file effect5x3.h.

References effect_mask.

Referenced by countEffectPieces().

## expect()

osl::progress::Effect5x3WithBonus osl::progress::Effect5x3WithBonus::expect | ( | const NumEffectState & | state,
|  | Move | move ) const

Definition at line 331 of file effect5x3.cc.

References osl::alt(), osl::Move::capturePtype(), Effect5x3WithBonus(), osl::Move::player(), osl::playerToIndex(), osl::progress::Effect5x3::progresses, osl::PTYPE_EMPTY, osl::progress::Effect5x3::stand_progresses, and updateStand().

## makeEffectMask() [1/2]

template<osl::Player Defense>

osl::PieceMask osl::progress::Effect5x3WithBonus::makeEffectMask | ( | const NumEffectState & | state | ) |

Definition at line 123 of file effect5x3.cc.

References osl::Centering5x3::adjustCenter(), osl::NumEffectState::effectSetAt(), and osl::SimpleState::kingSquare().

## makeEffectMask() [2/2]

template<Player Defense>

PieceMask osl::progress::Effect5x3WithBonus::makeEffectMask | ( | const NumEffectState & | state | ) |

static private

Referenced by Effect5x3WithBonus(), and update().

## makeProgressAreaBonus() [1/2]

template<osl::Player Attack>

int osl::progress::Effect5x3WithBonus::makeProgressAreaBonus | ( | const NumEffectState & | state,
|  | Square | king )

static

Definition at line 291 of file effect5x3.cc.

References osl::Centering5x3::adjustCenter(), makeProgressAreaBonus(), and osl::Square::squareForBlack().

Referenced by Effect5x3WithBonus(), makeProgressAreaBonus(), and update().

## makeProgressAreaBonus() [2/2]

template<osl::Player Attack, bool AlwaysPromotable, bool AlwaysNotPromotable>

int osl::progress::Effect5x3WithBonus::makeProgressAreaBonus | ( | const NumEffectState & | state,
|  | Square | king,
|  | Square | center )

static

Definition at line 198 of file effect5x3.cc.

References attackEffect3(), osl::Square::canPromote(), osl::progress::Effect5x3_Table, osl::Square::x(), and osl::Square::y().

## progress16bonus()

const Progress16 osl::progress::Effect5x3WithBonus::progress16bonus | ( | Player | p | ) | const

inline

Definition at line 97 of file effect5x3.h.

References osl::progress::Effect5x3::progress16each(), progress_bonuses, and osl::progress::Effect5x3::stand_progresses.

## update()

void osl::progress::Effect5x3WithBonus::update | ( | const NumEffectState & | new_state,
|  | Move | last_move )

Definition at line 306 of file effect5x3.cc.

References osl::container::BoardMask::anyInRange(), osl::BLACK, osl::Board_Mask_Table5x3_Center, osl::NumEffectState::changedEffects(), effect_mask, osl::Move::from(), osl::SimpleState::kingSquare(), makeEffectMask(), makeProgressAreaBonus(), progress_bonuses, osl::container::BoardMask::set(), osl::Move::to(), osl::progress::Effect5x3::update(), updateProgressBonuses(), and osl::WHITE.

## updateProgressBonuses()

void osl::progress::Effect5x3WithBonus::updateProgressBonuses | ( | const NumEffectState & | state,
|  | bool | black = true,
|  | bool | white = true )

private

Definition at line 344 of file effect5x3.cc.

References osl::BLACK, countEffectPieces(), progress_bonuses, and osl::WHITE.

Referenced by Effect5x3WithBonus(), and update().

## updateStand()

void osl::progress::Effect5x3WithBonus::updateStand | ( | Player | pl,
|  | Move | m )

inline private

Definition at line 113 of file effect5x3.h.

References osl::progress::Effect5x3::stand_progresses, and osl::progress::Effect5x3::updateStand().

Referenced by expect().

## Member Data Documentation

## effect_mask

CArray<PieceMask, 2> osl::progress::Effect5x3WithBonus::effect_mask

private

Definition at line 116 of file effect5x3.h.

Referenced by effect5x3Mask(), Effect5x3WithBonus(), and update().

## progress_bonuses

CArray<int,2> osl::progress::Effect5x3WithBonus::progress_bonuses

private

Definition at line 115 of file effect5x3.h.

Referenced by Effect5x3WithBonus(), progress16bonus(), update(), and updateProgressBonuses().

The documentation for this struct was generated from the following files:

- effect5x3.h
- effect5x3.cc