private void UpdateLine(int x, int y, int dx, int dy, ReversiColor color)
{
int i, j;
ReversiColor inverse_color = InverseColor(color);
for(i=x+dx, j=y+dy; this.board[i,j] == inverse_color; i+=dx, j+=dy);
if(!(i==x+dx && j==y+dy) && this.board[i,j]==color)
for(i-=dx, j-=dy; !(i==x && j==y); i-=dx, j-=dy)
this.board[i,j] = color;
}