ReversiForm  1.0.0
ReversiForm
Public Member Functions | Properties | Private Member Functions | Private Attributes | List of all members
ReversiForm.MyReversi Class Reference

リバーシクラス More...

Collaboration diagram for ReversiForm.MyReversi:
Collaboration graph

Public Member Functions

 MyReversi (int masuCnt, int masuMax)
 コンストラクタ More...
 
MyReversi Clone ()
 コピー More...
 
void reset ()
 リセット More...
 
void AnalysisReversi (int bPassEna, int wPassEna)
 解析を行う More...
 
int getMasuSts (int y, int x)
 マスステータスを取得 More...
 
int getMasuStsOld (int y, int x)
 以前のマスステータスを取得 More...
 
int getMasuStsEna (int color, int y, int x)
 指定座標に指定色を置けるかチェック More...
 
int getMasuStsCnt (int color, int y, int x)
 指定座標の獲得コマ数取得 More...
 
int getColorEna (int color)
 指定色が現在置ける場所があるかチェック More...
 
int getGameEndSts ()
 ゲーム終了かチェック More...
 
int setMasuSts (int color, int y, int x)
 指定座標にコマを置く More...
 
int setMasuStsForcibly (int color, int y, int x)
 指定座標にコマを強制的に置く More...
 
int setMasuCnt (int cnt)
 マスの数変更 More...
 
ReversiPoint getPoint (int color, int num)
 ポイント座標取得 More...
 
int getPointCnt (int color)
 ポイント座標数取得 More...
 
int getBetCnt (int color)
 コマ数取得 More...
 
int getPassEna (int color, int y, int x)
 パス判定 More...
 
ReversiHistory getHistory (int num)
 履歴取得 More...
 
int getHistoryCnt ()
 履歴数取得 More...
 
ReversiAnz getPointAnz (int color, int y, int x)
 ポイント座標解析取得 More...
 
int checkEdge (int color, int y, int x)
 角の隣に置いても角を取られないマス検索 More...
 
int getEdgeSideZero (int y, int x)
 指定座標が角か取得 More...
 
int getEdgeSideOne (int y, int x)
 指定座標が角の一つ手前か取得 More...
 
int getEdgeSideTwo (int y, int x)
 指定座標が角の二つ手前か取得 More...
 
int getEdgeSideThree (int y, int x)
 指定座標が角の三つ以上手前か取得 More...
 

Properties

int [,] mMasuSts [get, set]
 
int [,] mMasuStsOld [get, set]
 
int [,] mMasuStsEnaB [get, set]
 
int [,] mMasuStsCntB [get, set]
 
int [,] mMasuStsPassB [get, set]
 
ReversiAnz [,] mMasuStsAnzB [get, set]
 
ReversiPoint [] mMasuPointB [get, set]
 
int mMasuPointCntB [get, set]
 
int mMasuBetCntB [get, set]
 
int [,] mMasuStsEnaW [get, set]
 
int [,] mMasuStsCntW [get, set]
 
int [,] mMasuStsPassW [get, set]
 
ReversiAnz [,] mMasuStsAnzW [get, set]
 
ReversiPoint [] mMasuPointW [get, set]
 
int mMasuPointCntW [get, set]
 
int mMasuBetCntW [get, set]
 
int mMasuCnt [get, set]
 
int mMasuCntMax [get, set]
 
int mMasuHistCur [get, set]
 
ReversiHistory [] mMasuHist [get, set]
 

Private Member Functions

int makeMasuSts (int color)
 各コマの置ける場所等のステータス作成 More...
 
void revMasuSts (int color, int y, int x)
 コマをひっくり返す More...
 
int checkPara (int para, int min, int max)
 パラメーター範囲チェック More...
 
void AnalysisReversiBlack ()
 解析を行う(黒) More...
 
void AnalysisReversiWhite ()
 解析を行う(白) More...
 

Private Attributes

int [,] _mMasuSts
 マスの状態
 
int [,] _mMasuStsOld
 以前のマスの状態
 
int [,] _mMasuStsEnaB
 黒の置ける場所
 
int [,] _mMasuStsCntB
 黒の獲得コマ数
 
int [,] _mMasuStsPassB
 黒が相手をパスさせる場所
 
ReversiAnz [,] _mMasuStsAnzB
 黒がその場所に置いた場合の解析結果
 
ReversiPoint [] _mMasuPointB
 黒の置ける場所座標一覧
 
int _mMasuPointCntB
 黒の置ける場所座標一覧数
 
int _mMasuBetCntB
 黒コマ数
 
int [,] _mMasuStsEnaW
 白の置ける場所
 
int [,] _mMasuStsCntW
 白の獲得コマ数
 
int [,] _mMasuStsPassW
 白が相手をパスさせる場所
 
ReversiAnz [,] _mMasuStsAnzW
 白がその場所に置いた場合の解析結果
 
ReversiPoint [] _mMasuPointW
 白の置ける場所座標一覧
 
int _mMasuPointCntW
 白の置ける場所座標一覧数
 
int _mMasuBetCntW
 白コマ数
 
int _mMasuCnt
 縦横マス数
 
int _mMasuCntMax
 縦横マス最大数
 
int _mMasuHistCur
 履歴現在位置
 
ReversiHistory [] _mMasuHist
 履歴
 

Detailed Description

リバーシクラス

Definition at line 30 of file MyReversi.cs.

Constructor & Destructor Documentation

◆ MyReversi()

ReversiForm.MyReversi.MyReversi ( int  masuCnt,
int  masuMax 
)

コンストラクタ

Parameters
[in]intmasuCnt 縦横マス数
[in]intmasuMax 縦横マス最大数
Returns
ありません
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 168 of file MyReversi.cs.

Here is the call graph for this function:

Member Function Documentation

◆ AnalysisReversi()

void ReversiForm.MyReversi.AnalysisReversi ( int  bPassEna,
int  wPassEna 
)

解析を行う

Parameters
[in]intbPassEna 1=黒パス有効
[in]intwPassEna 1=白パス有効
Returns
ありません
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 948 of file MyReversi.cs.

Referenced by ReversiForm.ReversiPlay.reset(), ReversiForm.ReversiPlay.reversiPlay(), and ReversiForm.ReversiPlay.reversiPlayCpu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AnalysisReversiBlack()

void ReversiForm.MyReversi.AnalysisReversiBlack ( )
private

解析を行う(黒)

Returns
ありません
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 670 of file MyReversi.cs.

Referenced by ReversiForm.MyReversi.AnalysisReversi().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AnalysisReversiWhite()

void ReversiForm.MyReversi.AnalysisReversiWhite ( )
private

解析を行う(白)

Returns
ありません
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 808 of file MyReversi.cs.

Referenced by ReversiForm.MyReversi.AnalysisReversi().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkEdge()

int ReversiForm.MyReversi.checkEdge ( int  color,
int  y,
int  x 
)

角の隣に置いても角を取られないマス検索

Parameters
[in]intcolor コマ色
[in]inty マスのY座標
[in]intx マスのX座標
Returns
0 : 取られる それ以外 : 取られない
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 1312 of file MyReversi.cs.

Referenced by ReversiForm.MyReversi.AnalysisReversiBlack(), ReversiForm.MyReversi.AnalysisReversiWhite(), and ReversiForm.ReversiPlay.reversiPlayCpu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkPara()

int ReversiForm.MyReversi.checkPara ( int  para,
int  min,
int  max 
)
private

パラメーター範囲チェック

Parameters
[in]intpara チェックパラメーター
[in]intmin パラメーター最小値
[in]intmax パラメーター最大値
Returns
0 : 成功 それ以外 : 失敗
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 655 of file MyReversi.cs.

Referenced by ReversiForm.MyReversi.getHistory(), ReversiForm.MyReversi.getMasuSts(), ReversiForm.MyReversi.getMasuStsCnt(), ReversiForm.MyReversi.getMasuStsEna(), ReversiForm.MyReversi.getMasuStsOld(), ReversiForm.MyReversi.getPassEna(), ReversiForm.MyReversi.getPoint(), ReversiForm.MyReversi.getPointAnz(), and ReversiForm.MyReversi.setMasuCnt().

Here is the caller graph for this function:

◆ Clone()

MyReversi ReversiForm.MyReversi.Clone ( )

コピー

Returns
オブジェクトコピー
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 230 of file MyReversi.cs.

◆ getBetCnt()

int ReversiForm.MyReversi.getBetCnt ( int  color)

コマ数取得

Parameters
[in]intcolor コマ色
Returns
コマ数取得
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 1215 of file MyReversi.cs.

Referenced by ReversiForm.ReversiPlay.execMessage(), ReversiForm.ReversiPlay.gameEndAnimExec(), ReversiForm.ReversiPlay.reversiPlayCpu(), and ReversiForm.ReversiPlay.reversiPlayEnd().

Here is the caller graph for this function:

◆ getColorEna()

int ReversiForm.MyReversi.getColorEna ( int  color)

指定色が現在置ける場所があるかチェック

Parameters
[in]intcolor コマ色
Returns
0 : 成功 それ以外 : 失敗
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 1063 of file MyReversi.cs.

Referenced by ReversiForm.MyReversi.AnalysisReversiBlack(), ReversiForm.MyReversi.AnalysisReversiWhite(), ReversiForm.MyReversi.getGameEndSts(), ReversiForm.ReversiPlay.reversiPlay(), and ReversiForm.ReversiPlay.reversiPlaySub().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getEdgeSideOne()

int ReversiForm.MyReversi.getEdgeSideOne ( int  y,
int  x 
)

指定座標が角の一つ手前か取得

Parameters
[in]inty Y座標
[in]intx X座標
Returns
0 : 成功 それ以外 : 失敗
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 1454 of file MyReversi.cs.

Referenced by ReversiForm.MyReversi.AnalysisReversiBlack(), ReversiForm.MyReversi.AnalysisReversiWhite(), and ReversiForm.ReversiPlay.reversiPlayCpu().

Here is the caller graph for this function:

◆ getEdgeSideThree()

int ReversiForm.MyReversi.getEdgeSideThree ( int  y,
int  x 
)

指定座標が角の三つ以上手前か取得

Parameters
[in]inty Y座標
[in]intx X座標
Returns
0 : 成功 それ以外 : 失敗
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 1518 of file MyReversi.cs.

Referenced by ReversiForm.MyReversi.AnalysisReversiBlack(), ReversiForm.MyReversi.AnalysisReversiWhite(), and ReversiForm.ReversiPlay.reversiPlayCpu().

Here is the caller graph for this function:

◆ getEdgeSideTwo()

int ReversiForm.MyReversi.getEdgeSideTwo ( int  y,
int  x 
)

指定座標が角の二つ手前か取得

Parameters
[in]inty Y座標
[in]intx X座標
Returns
0 : 成功 それ以外 : 失敗
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 1486 of file MyReversi.cs.

Referenced by ReversiForm.MyReversi.AnalysisReversiBlack(), ReversiForm.MyReversi.AnalysisReversiWhite(), and ReversiForm.ReversiPlay.reversiPlayCpu().

Here is the caller graph for this function:

◆ getEdgeSideZero()

int ReversiForm.MyReversi.getEdgeSideZero ( int  y,
int  x 
)

指定座標が角か取得

Parameters
[in]inty Y座標
[in]intx X座標
Returns
0 : 成功 それ以外 : 失敗
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 1430 of file MyReversi.cs.

Referenced by ReversiForm.MyReversi.AnalysisReversiBlack(), ReversiForm.MyReversi.AnalysisReversiWhite(), and ReversiForm.ReversiPlay.reversiPlayCpu().

Here is the caller graph for this function:

◆ getGameEndSts()

int ReversiForm.MyReversi.getGameEndSts ( )

ゲーム終了かチェック

Returns
0 : 続行 それ以外 : ゲーム終了
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 1085 of file MyReversi.cs.

Referenced by ReversiForm.ReversiPlay.reversiPlay(), and ReversiForm.ReversiPlay.reversiPlaySub().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHistory()

ReversiHistory ReversiForm.MyReversi.getHistory ( int  num)

履歴取得

Parameters
[in]intnum ポイント
Returns
履歴 null : 失敗
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 1256 of file MyReversi.cs.

Here is the call graph for this function:

◆ getHistoryCnt()

int ReversiForm.MyReversi.getHistoryCnt ( )

履歴数取得

Returns
履歴数
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 1273 of file MyReversi.cs.

◆ getMasuSts()

int ReversiForm.MyReversi.getMasuSts ( int  y,
int  x 
)

マスステータスを取得

Parameters
[in]inty 取得するマスのY座標
[in]intx 取得するマスのX座標
Returns
-1 : 失敗 それ以外 : マスステータス
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 988 of file MyReversi.cs.

Referenced by ReversiForm.MyReversi.checkEdge(), ReversiForm.ReversiPlay.drawUpdate(), and ReversiForm.ReversiPlay.execMessage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMasuStsCnt()

int ReversiForm.MyReversi.getMasuStsCnt ( int  color,
int  y,
int  x 
)

指定座標の獲得コマ数取得

Parameters
[in]intcolor コマ色
[in]inty マスのY座標
[in]intx マスのX座標
Returns
-1 : 失敗 それ以外 : 獲得コマ数
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 1044 of file MyReversi.cs.

Referenced by ReversiForm.ReversiPlay.execMessage(), and ReversiForm.ReversiPlay.reversiPlayCpu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMasuStsEna()

int ReversiForm.MyReversi.getMasuStsEna ( int  color,
int  y,
int  x 
)

指定座標に指定色を置けるかチェック

Parameters
[in]intcolor コマ色
[in]inty マスのY座標
[in]intx マスのX座標
Returns
1 : 成功 それ以外 : 失敗
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 1023 of file MyReversi.cs.

Referenced by ReversiForm.MyReversi.AnalysisReversiBlack(), ReversiForm.MyReversi.AnalysisReversiWhite(), ReversiForm.ReversiPlay.execMessage(), ReversiForm.MyReversi.getColorEna(), ReversiForm.ReversiPlay.reversiPlayCpu(), and ReversiForm.MyReversi.setMasuSts().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMasuStsOld()

int ReversiForm.MyReversi.getMasuStsOld ( int  y,
int  x 
)

以前のマスステータスを取得

Parameters
[in]inty 取得するマスのY座標
[in]intx 取得するマスのX座標
Returns
-1 : 失敗 それ以外 : マスステータス
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 1005 of file MyReversi.cs.

Referenced by ReversiForm.ReversiPlay.drawUpdate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPassEna()

int ReversiForm.MyReversi.getPassEna ( int  color,
int  y,
int  x 
)

パス判定

Parameters
[in]intcolor コマ色
[in]inty マスのY座標
[in]intx マスのX座標
Returns
パス判定
  • 0 : NOT PASS
  • 1 : PASS
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 1237 of file MyReversi.cs.

Referenced by ReversiForm.ReversiPlay.reversiPlayCpu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPoint()

ReversiPoint ReversiForm.MyReversi.getPoint ( int  color,
int  num 
)

ポイント座標取得

Parameters
[in]intcolor コマ色
[in]intnum ポイント
Returns
ポイント座標 null : 失敗
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 1179 of file MyReversi.cs.

Referenced by ReversiForm.ReversiPlay.reset(), and ReversiForm.ReversiPlay.reversiPlayCpu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPointAnz()

ReversiAnz ReversiForm.MyReversi.getPointAnz ( int  color,
int  y,
int  x 
)

ポイント座標解析取得

Parameters
[in]intcolor コマ色
[in]inty マスのY座標
[in]intx マスのX座標
Returns
ポイント座標解析 null : 失敗
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 1291 of file MyReversi.cs.

Referenced by ReversiForm.ReversiPlay.reversiPlayCpu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPointCnt()

int ReversiForm.MyReversi.getPointCnt ( int  color)

ポイント座標数取得

Parameters
[in]intcolor コマ色
Returns
ポイント座標数取得
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 1198 of file MyReversi.cs.

Referenced by ReversiForm.MyReversi.AnalysisReversiBlack(), ReversiForm.MyReversi.AnalysisReversiWhite(), ReversiForm.ReversiPlay.reset(), and ReversiForm.ReversiPlay.reversiPlayCpu().

Here is the caller graph for this function:

◆ makeMasuSts()

int ReversiForm.MyReversi.makeMasuSts ( int  color)
private

各コマの置ける場所等のステータス作成

Parameters
[in]intcolor ステータスを作成するコマ
Returns
ありません
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 273 of file MyReversi.cs.

Referenced by ReversiForm.MyReversi.AnalysisReversi(), ReversiForm.MyReversi.AnalysisReversiBlack(), ReversiForm.MyReversi.AnalysisReversiWhite(), ReversiForm.MyReversi.reset(), and ReversiForm.MyReversi.setMasuSts().

Here is the caller graph for this function:

◆ reset()

void ReversiForm.MyReversi.reset ( )

リセット

Returns
ありません
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 243 of file MyReversi.cs.

Referenced by ReversiForm.MyReversi.MyReversi(), ReversiForm.ReversiPlay.reset(), and ReversiForm.MyReversi.setMasuCnt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ revMasuSts()

void ReversiForm.MyReversi.revMasuSts ( int  color,
int  y,
int  x 
)
private

コマをひっくり返す

Parameters
[in]intcolor ひっくり返す元コマ
[in]inty ひっくり返す元コマのY座標
[in]intx ひっくり返す元コマのX座標
Returns
ありません
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 479 of file MyReversi.cs.

Referenced by ReversiForm.MyReversi.AnalysisReversiBlack(), ReversiForm.MyReversi.AnalysisReversiWhite(), and ReversiForm.MyReversi.setMasuSts().

Here is the caller graph for this function:

◆ setMasuCnt()

int ReversiForm.MyReversi.setMasuCnt ( int  cnt)

マスの数変更

Parameters
[in]intcnt マスの数
Returns
0 : 成功 それ以外 : 失敗
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 1154 of file MyReversi.cs.

Referenced by ReversiForm.ReversiPlay.reset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMasuSts()

int ReversiForm.MyReversi.setMasuSts ( int  color,
int  y,
int  x 
)

指定座標にコマを置く

Parameters
[in]intcolor コマ色
[in]inty マスのY座標
[in]intx マスのX座標
Returns
0 : 成功 それ以外 : 失敗
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 1104 of file MyReversi.cs.

Referenced by ReversiForm.ReversiPlay.reset(), ReversiForm.ReversiPlay.reversiPlay(), and ReversiForm.ReversiPlay.reversiPlayCpu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMasuStsForcibly()

int ReversiForm.MyReversi.setMasuStsForcibly ( int  color,
int  y,
int  x 
)

指定座標にコマを強制的に置く

Parameters
[in]intcolor コマ色
[in]inty マスのY座標
[in]intx マスのX座標
Returns
0 : 成功 それ以外 : 失敗
Author
Yuta Yoshinaga
Date
2017.10.20

Definition at line 1136 of file MyReversi.cs.

Referenced by ReversiForm.ReversiPlay.gameEndAnimExec().

Here is the caller graph for this function:

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