osl::progress::Effect5x3 Struct Reference

玉の周囲5x3の領域の利きの数と持駒から計算した進行度. More...

`#include <effect5x3.h>`

Inheritance diagram for osl::progress::Effect5x3:

## Public Member Functions

| 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

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 の値を返す.

## Protected Attributes

CArray< int, 2 > | progresses
CArray< int, 2 > | stand_progresses
CArray< int, 2 > | area_progresses

## Detailed Description

玉の周囲5x3の領域の利きの数と持駒から計算した進行度.

5x3領域は盤面内になるように補正する． 黒と白の両方の進行度を持つ． 持駒の重みは PAWN 1 LANCE 4 KNIGHT,SILVER,GOLD 8 BISHOP,ROOK 12 利きの数は8の重みを持つ．

Definition at line 26 of file effect5x3.h.

## Constructor & Destructor Documentation

## Effect5x3()

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

explicit

Definition at line 6 of file effect5x3.cc.

References area_progresses, osl::BLACK, osl::SimpleState::kingSquare(), makeProgressArea(), makeProgressStand(), progresses, stand_progresses, and osl::WHITE.

Referenced by osl::progress::Effect5x3WithBonus::Effect5x3WithBonus(), and expect().

## Member Function Documentation

## changeTurn()

void osl::progress::Effect5x3::changeTurn | ( |  | ) |

inline

Definition at line 74 of file effect5x3.h.

## expect()

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

Definition at line 97 of file effect5x3.cc.

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

## makeProgress() [1/2]

int osl::progress::Effect5x3::makeProgress | ( | const NumEffectState & | state | ) |

inline static

Definition at line 47 of file effect5x3.h.

References osl::BLACK, makeProgress(), and osl::WHITE.

## makeProgress() [2/2]

int osl::progress::Effect5x3::makeProgress | ( | Player | defense,
|  | const NumEffectState & | state )

inline static

王の位置を指定したprogressの計算.

Parameters

  defense | - こちらの玉に注目したprogress
  state | - 盤面
  king | - 玉の位置がここにあるとする． 一般には，盤面から玉の位置は特定できるが，差分計算の途中では 一致しないとして呼び出すことがある．

Definition at line 44 of file effect5x3.h.

References osl::SimpleState::kingSquare(), and makeProgressAll().

Referenced by makeProgress().

## makeProgressAll()

int osl::progress::Effect5x3::makeProgressAll | ( | Player | defense,
|  | const NumEffectState & | state,
|  | Square | king )

static

Definition at line 17 of file effect5x3.cc.

References osl::alt(), makeProgressArea(), and makeProgressStand().

Referenced by makeProgress().

## makeProgressArea()

int osl::progress::Effect5x3::makeProgressArea | ( | Player | attack,
|  | const NumEffectState & | state,
|  | Square | king )

static

Definition at line 25 of file effect5x3.cc.

References osl::Centering5x3::adjustCenter(), osl::NumEffectState::countEffect(), osl::progress::Effect5x3_Table, osl::Square::x(), and osl::Square::y().

Referenced by Effect5x3(), makeProgressAll(), and update().

## makeProgressStand()

int osl::progress::Effect5x3::makeProgressStand | ( | Player | attack,
|  | const NumEffectState & | state )

static

Definition at line 49 of file effect5x3.cc.

References osl::BISHOP, osl::SimpleState::countPiecesOnStand(), osl::GOLD, osl::KNIGHT, osl::LANCE, osl::PAWN, osl::ROOK, osl::SILVER, osl::progress::Effect5x3Table::StandBISHOP, osl::progress::Effect5x3Table::StandGOLD, osl::progress::Effect5x3Table::StandKNIGHT, osl::progress::Effect5x3Table::StandLANCE, osl::progress::Effect5x3Table::StandPAWN, osl::progress::Effect5x3Table::StandROOK, and osl::progress::Effect5x3Table::StandSILVER.

Referenced by Effect5x3(), and makeProgressAll().

## progress()

int osl::progress::Effect5x3::progress | ( | Player | p | ) | const

inline

Definition at line 75 of file effect5x3.h.

References progresses.

Referenced by progress16(), progress16(), and progress16each().

## progress16() [1/3]

const Progress16 osl::progress::Effect5x3::progress16 | ( |  | ) | const

inline

Definition at line 76 of file effect5x3.h.

References progress16(), and progresses.

Referenced by progress16().

## progress16() [2/3]

const Progress16 osl::progress::Effect5x3::progress16 | ( | int | progress | ) |

inline static

0-15 の値を返す

Definition at line 54 of file effect5x3.h.

References progress().

## progress16() [3/3]

const Progress16 osl::progress::Effect5x3::progress16 | ( | Player | p | ) | const

inline

Definition at line 80 of file effect5x3.h.

References progress(), and progress16each().

## progress16each()

const Progress16 osl::progress::Effect5x3::progress16each | ( | int | progress | ) |

inline static

0-15 の値を返す.

プレイヤ個人毎

Definition at line 64 of file effect5x3.h.

References progress().

Referenced by progress16(), and osl::progress::Effect5x3WithBonus::progress16bonus().

## update()

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

Definition at line 79 of file effect5x3.cc.

References osl::alt(), osl::container::BoardMask::anyInRange(), area_progresses, osl::BLACK, osl::Board_Mask_Table5x3_Center, osl::NumEffectState::changedEffects(), osl::KING, osl::SimpleState::kingSquare(), makeProgressArea(), osl::Move::player(), progresses, osl::Move::ptype(), stand_progresses, osl::SimpleState::turn(), updateStand(), and osl::WHITE.

Referenced by osl::progress::Effect5x3WithBonus::update().

## updateStand()

void osl::progress::Effect5x3::updateStand | ( | int & | old_stand,
|  | Move | last_move )

static

Definition at line 64 of file effect5x3.cc.

References osl::Move::capturePtype(), osl::progress::Effect5x3_Table, osl::Move::isDrop(), osl::Move::ptype(), osl::PTYPE_EMPTY, and osl::unpromote().

Referenced by expect(), update(), and osl::progress::Effect5x3WithBonus::updateStand().

## Member Data Documentation

## area_progresses

CArray<int,2> osl::progress::Effect5x3::area_progresses

protected

Definition at line 71 of file effect5x3.h.

Referenced by Effect5x3(), and update().

## progresses

CArray<int,2> osl::progress::Effect5x3::progresses

protected

Definition at line 71 of file effect5x3.h.

Referenced by Effect5x3(), expect(), osl::progress::Effect5x3WithBonus::expect(), progress(), progress16(), and update().

## stand_progresses

CArray<int,2> osl::progress::Effect5x3::stand_progresses

protected

Definition at line 71 of file effect5x3.h.

Referenced by Effect5x3(), expect(), osl::progress::Effect5x3WithBonus::expect(), osl::progress::Effect5x3WithBonus::progress16bonus(), update(), and osl::progress::Effect5x3WithBonus::updateStand().

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

- effect5x3.h
- effect5x3.cc