Reversi.ReversiBoard.this C# (CSharp) Method

this() public method

set 盤面に新たに駒を置き、盤面の更新を行う get 盤面に置かれた駒の色を返す x : 0〜width-1 y : 0〜height-1
public this ( int x, int y ) : ReversiColor
x int
y int
return ReversiColor
		public ReversiColor this[int x, int y]
		{
			set
			{
				++x; ++y;
				this.board[x,y] = value;//そのマス目にこまを置く
				UpdateLine(x, y, -1,  0, value);//左
				UpdateLine(x, y,  1,  0, value);//右
				UpdateLine(x, y,  0, -1, value);//上
				UpdateLine(x, y,  0,  1, value);//下
				UpdateLine(x, y, -1, -1, value);//左上
				UpdateLine(x, y,  1, -1, value);//右上
				UpdateLine(x, y, -1,  1, value);//左下
				UpdateLine(x, y,  1,  1, value);//右上
			}
			get
			{
				if(x >= this.width || x < 0 || y >= this.height || y < 0)
					return ReversiColor.Wall;
				return this.board[x+1, y+1];
			}
		}