Method | Description | |
---|---|---|
Check ( int x, int y, ReversiColor color ) : bool |
座標(x,y)にコマをおけるかどうかを調べる 調べる場所のx座標 0〜width-1 調べる場所のy座標 0〜width-1
|
|
CheckAll ( ReversiColor color ) : bool |
盤面に置けるますがあるかどうかを調べる
|
|
Clone ( ) : |
自分自身のコピーを生成
|
|
CountUp ( int &black_num, int &white_num ) : void |
駒の数を数える
|
|
GetScore ( ReversiColor color ) : int | ||
InverseColor ( ReversiColor color ) : ReversiColor |
駒の色と逆の色を返す
|
|
ReversiBoard ( ) : System |
盤面の初期化 盤面のサイズはデフォルトでは8×8
|
|
ReversiBoard ( int width, int height ) : System |
盤面の初期化 盤面の幅は自由に決めれる
|
|
this ( int x, int y ) : ReversiColor |
set 盤面に新たに駒を置き、盤面の更新を行う get 盤面に置かれた駒の色を返す x : 0〜width-1 y : 0〜height-1
|
Method | Description | |
---|---|---|
ReversiBoard ( |
盤面のコピーを作成するコンストラクタ
|
Method | Description | |
---|---|---|
CheckLine ( int x, int y, int dx, int dy, ReversiColor color ) : bool |
座標(x,y)にコマをおけるかどうか、1ライン分調べる (Checkメソッドで利用する) 調べる場所のx座標 調べる場所のy座標
|
|
UpdateLine ( int x, int y, int dx, int dy, ReversiColor color ) : void |
盤面の更新を1ラインずつ行う 置く場所のx座標 置く場所のy座標 置く駒の色
|
public Check ( int x, int y, ReversiColor color ) : bool | ||
x | int | |
y | int | |
color | ReversiColor | |
return | bool |
public CheckAll ( ReversiColor color ) : bool | ||
color | ReversiColor | |
return | bool |
public CountUp ( int &black_num, int &white_num ) : void | ||
black_num | int | 黒い駒の数を返す |
white_num | int | 白い駒の数を返す |
return | void |
static public InverseColor ( ReversiColor color ) : ReversiColor | ||
color | ReversiColor | 駒の色 |
return | ReversiColor |
protected ReversiBoard ( |
||
b | コピー元 | |
return | System |
public ReversiBoard ( int width, int height ) : System | ||
width | int | 盤面の幅 |
height | int | 盤面の高さ |
return | System |