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];
}
}