getScoreInDirection(x, y, dx, dy, player) {
    let score = 0;
    let i = x + dx;
    let j = y + dy;
    while (i >= 0 && i < 8 && j >= 0 && j < 8) {
      if (this.board[i][j] === -1) return 0;
      if (this.board[i][j] === player) {
        return score;
      }
      score++;
      i += dx;
      j += dy;
    }
    return 0;
  }
Return the score received if played at (x, y) in the direction (dx, dy)