bool _canChord()

in lib/src/game/game_core.dart [161:177]


  bool _canChord(int x, int y) {
    final currentSS = _states.get(x, y);
    if (currentSS == SquareState.revealed) {
      // might be a 'chord' reveal
      final adjCount = field.getAdjacentCount(x, y)!;
      if (adjCount > 0) {
        final adjHidden = _getAdjacentCount(x, y, SquareState.hidden);
        if (adjHidden > 0) {
          final adjFlags = _getAdjacentCount(x, y, SquareState.flagged);
          if (adjFlags == adjCount) {
            return true;
          }
        }
      }
    }
    return false;
  }