flipInDirection(x, y, dx, dy, player) {
    let i = x + dx;
    let j = y + dy;
    while (i >= 0 && i < 8 && j >= 0 && j < 8) {
      if (this.board[i][j] === player) return;
      this.board[i][j] = player;
      this.score[player]++;
      this.score[1 - player]--;
      i += dx;
      j += dy;
    }
  }
Flip those in (dx,dy) direction from (x,y)