osl::progress::Effect5x3Table Class Reference

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
osl::progress::Effect5x3Table Class Reference

Effect5x3の差分計算で使うテーブル. More...

`#include <effect5x3Table.h>`

Collaboration diagram for osl::progress::Effect5x3Table:
[legend]

## Public Types
enum | { StandPAWN =1, StandLANCE =4, StandKNIGHT =8, StandSILVER =8, StandGOLD =8, StandBISHOP =12, StandROOK =12 }

## Public Member Functions
| Effect5x3Table ()
unsigned int | piecesOnStand (Ptype ptype) const
| 持駒のPtypeごとの寄与を表すテーブルの参照. More...
unsigned int | countShortEffect (PtypeO ptypeO, Offset32 offset32) const
| 5x3領域への短い利きの数の計算. More...
LongEffect4 const & | getLongEffect (PtypeO ptypeO, Offset32 offset32) const
| 5x3領域へのPtypeOを限定した長い利きの計算. More...
LongEffect const & | getBlockEffect (Direction d, Offset32 offset32) const
| 5x3領域へのdirectionを限定した長い利きの計算. More...
unsigned int | getAttackEffect (Player pl, Square pos, int x, int y) const
unsigned int | getDefenseEffect (Player pl, Square pos, int x, int y) const

## Private Member Functions
void | setupOnStand ()
void | setupShortEffect ()
void | setupLongEffect ()
void | setupBlockEffect ()
void | setupAttackEffect ()
void | setupDefenseEffect ()

## Private Attributes
CArray< unsigned int, PTYPE_SIZE > | onStand
CArray2d< unsigned int, PTYPEO_SIZE, Offset32::SIZE > | shortEffect
CArray2d< LongEffect4, PTYPEO_SIZE, Offset32::SIZE > | longEffect
CArray2d< LongEffect, 8, Offset32::SIZE > | blockEffect
CArray3d< unsigned int, 2, Square::SIZE, 5 *3 > | attackEffect
CArray3d< unsigned int, 2, Square::SIZE, 5 *3 > | defenseEffect

## Detailed Description

Effect5x3の差分計算で使うテーブル.

Definition at line 39 of file effect5x3Table.h.

## Member Enumeration Documentation

anonymous enum

Enumerator
StandPAWN |
StandLANCE |
StandKNIGHT |
StandSILVER |
StandGOLD |
StandBISHOP |
StandROOK |

Definition at line 42 of file effect5x3Table.h.

## Constructor & Destructor Documentation

osl::progress::Effect5x3Table::Effect5x3Table | ( | ) |  |

Definition at line 232 of file effect5x3Table.cc.

## Member Function Documentation

unsigned int osl::progress::Effect5x3Table::countShortEffect | ( | PtypeO | ptypeO,
|  | Offset32 | offset32
| ) |  | const
| inline

5x3領域への短い利きの数の計算.

ただし8倍したものを返す

Parameters

  ptypeO | - 利きをつけようとする駒のptypeO
  o32 | - (to - from)のOffset32版

Definition at line 85 of file effect5x3Table.h.

References osl::Offset32Base< Width, Width2 >::index(), osl::PTYPEO_MIN, and shortEffect.

unsigned int osl::progress::Effect5x3Table::getAttackEffect | ( | Player | pl,
|  | Square | pos,
|  | int | x,
|  | int | y
| ) |  | const
| inline

Definition at line 109 of file effect5x3Table.h.

References attackEffect, osl::Square::index(), and osl::Square::isOnBoard().

Referenced by osl::progress::Effect5x3::makeProgressArea(), and osl::progress::Effect5x3WithBonus::makeProgressAreaBonus().

LongEffect const& osl::progress::Effect5x3Table::getBlockEffect | ( | Direction | d,
|  | Offset32 | offset32
| ) |  | const
| inline

5x3領域へのdirectionを限定した長い利きの計算.

Parameters

  d | - 長い利きの方向
  o32 | - (to - from)のOffset32版

Definition at line 104 of file effect5x3Table.h.

References blockEffect, and osl::Offset32Base< Width, Width2 >::index().

unsigned int osl::progress::Effect5x3Table::getDefenseEffect | ( | Player | pl,
|  | Square | pos,
|  | int | x,
|  | int | y
| ) |  | const
| inline

Definition at line 114 of file effect5x3Table.h.

References defenseEffect, osl::Square::index(), and osl::Square::isOnBoard().

Referenced by osl::progress::Effect5x3d::makeProgress().

LongEffect4 const& osl::progress::Effect5x3Table::getLongEffect | ( | PtypeO | ptypeO,
|  | Offset32 | offset32
| ) |  | const
| inline

5x3領域へのPtypeOを限定した長い利きの計算.

ただし8倍したものを返す

Parameters

  ptypeO | - 利きをつけようとする駒のptypeO
  o32 | - (to - from)のOffset32版

Definition at line 95 of file effect5x3Table.h.

References osl::Offset32Base< Width, Width2 >::index(), longEffect, and osl::PTYPEO_MIN.

unsigned int osl::progress::Effect5x3Table::piecesOnStand | ( | Ptype | ptype) |  | const
| inline

持駒のPtypeごとの寄与を表すテーブルの参照.

以下の重みで計算 PAWN 1 LANCE 4 KNIGHT,SILVER,GOLD 8 BISHOP,ROOK 12

Parameters

  ptype | - 持駒のptype

Definition at line 75 of file effect5x3Table.h.

References onStand.

Referenced by osl::progress::Effect5x3::updateStand().

void osl::progress::Effect5x3Table::setupAttackEffect | ( | ) |  |
| private

Definition at line 173 of file effect5x3Table.cc.

References osl::Centering5x3::adjustCenter(), osl::BLACK, center, osl::Square::index(), osl::Square::rotate180(), osl::WHITE, osl::Square::x(), and osl::Square::y().

void osl::progress::Effect5x3Table::setupBlockEffect | ( | ) |  |
| private

Definition at line 142 of file effect5x3Table.cc.

References osl::alt(), osl::BLACK, and osl::Offset32Base< Width, Width2 >::index().

void osl::progress::Effect5x3Table::setupDefenseEffect | ( | ) |  |
| private

Definition at line 202 of file effect5x3Table.cc.

References osl::Centering5x3::adjustCenter(), osl::BLACK, center, osl::Square::index(), osl::Square::rotate180(), osl::WHITE, osl::Square::x(), and osl::Square::y().

void osl::progress::Effect5x3Table::setupLongEffect | ( | ) |  |
| private

Definition at line 157 of file effect5x3Table.cc.

References osl::alt(), osl::BLACK, osl::Offset32Base< Width, Width2 >::index(), osl::newPtypeO(), osl::PTYPE_MAX, osl::PTYPE_PIECE_MIN, and osl::ptypeOIndex().

void osl::progress::Effect5x3Table::setupOnStand | ( | ) |  |
| private

Definition at line 110 of file effect5x3Table.cc.

References osl::BISHOP, osl::GOLD, osl::KNIGHT, osl::LANCE, onStand, osl::PAWN, osl::PTYPE_MAX, osl::PTYPE_PIECE_MIN, osl::ROOK, osl::SILVER, StandBISHOP, StandGOLD, StandKNIGHT, StandLANCE, StandPAWN, StandROOK, StandSILVER, and osl::unpromote().

void osl::progress::Effect5x3Table::setupShortEffect | ( | ) |  |
| private

Definition at line 127 of file effect5x3Table.cc.

References osl::alt(), osl::BLACK, osl::Offset32Base< Width, Width2 >::index(), osl::newPtypeO(), osl::PTYPE_MAX, osl::PTYPE_PIECE_MIN, and osl::ptypeOIndex().

## Member Data Documentation

CArray3d<unsigned int,2,Square::SIZE,5*3> osl::progress::Effect5x3Table::attackEffect
| private

Definition at line 56 of file effect5x3Table.h.

Referenced by getAttackEffect().

CArray2d<LongEffect,8,Offset32::SIZE> osl::progress::Effect5x3Table::blockEffect
| private

Definition at line 55 of file effect5x3Table.h.

Referenced by getBlockEffect().

CArray3d<unsigned int,2,Square::SIZE,5*3> osl::progress::Effect5x3Table::defenseEffect
| private

Definition at line 57 of file effect5x3Table.h.

Referenced by getDefenseEffect().

CArray2d<LongEffect4,PTYPEO_SIZE,Offset32::SIZE> osl::progress::Effect5x3Table::longEffect
| private

Definition at line 54 of file effect5x3Table.h.

Referenced by getLongEffect().

CArray<unsigned int,PTYPE_SIZE> osl::progress::Effect5x3Table::onStand
| private

Definition at line 52 of file effect5x3Table.h.

Referenced by piecesOnStand(), and setupOnStand().

CArray2d<unsigned int,PTYPEO_SIZE,Offset32::SIZE> osl::progress::Effect5x3Table::shortEffect
| private

Definition at line 53 of file effect5x3Table.h.

Referenced by countShortEffect().

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

- effect5x3Table.h
- effect5x3Table.cc