Checks if the given pseudo-legal move is a kingside castling move.
323249
def is_kingside_castling(self, move: Move) -> bool:
        
        return self.is_castling(move) and square_file(move.to_square) > square_file(move.from_square)
125352
def move_knight(p1)
      row = get_row_from_index(p1)
      col = get_col_from_index(p1)

      valid = []
      valid_moves_no_friendly_fire = []

      # Valid knight moves based on its board position
      valid << (p1 + 17) if row < 7 && col < 8
      valid << (p1 + 15) if row < 7 && col > 1
      valid << (p1 + 10) if row < 8 && col < 7
      valid << (p1 + 6)  if row < 8 && col > 2
      valid << (p1 - 6)  if row > 1 && col < 7
      valid << (p1 - 10) if row > 1 && col > 2
      valid << (p1 - 15) if row > 2 && col < 8
      valid << (p1 - 17) if row > 2 && col > 1

      # All possible moves for the knight based on board boundaries will added
      # This iterator filters for friendly fire, and removes indexes pointing to same color pices
      valid.each do |pos|
        valid_moves_no_friendly_fire << pos unless piece_color(pos) == Move.color
      end

      valid_moves_no_friendly_fire
    end
739335
def has_free_moves(self):
        """"""
        return any(self._can_cell_be_merged(x, y)
                   for x in range(self.COUNT_X)
                   for y in range(self.COUNT_Y))
610119
public boolean isAlwaysFalse() {
        if (shardingConditions.isEmpty()) {
            return false;
        }
        for (ShardingCondition each : shardingConditions) {
            if (!(each instanceof AlwaysFalseShardingCondition)) {
                return false;
            }
        }
        return true;
    }
148196
private boolean hasRuleSet(CssAtRule atRule, CssTokenIterator iter)
  {
    int debugIndex;
    if (debug)
    {
      checkArgument(iter.last.getChar() == '{');
      debugIndex = iter.index();
    }
    List<CssToken> list = iter.list;
    for (int i = iter.index() + 1; i < list.size(); i++)
    {
      CssToken tk = list.get(i);
      if (MATCH_OPENBRACE.apply(tk))
      {
        return true;
      }
      else if (MATCH_SEMI_CLOSEBRACE.apply(tk))
      {
        return false;
      }
    }
    if (debug)
    {
      checkState(iter.last.getChar() == '{');
      checkState(iter.index() == debugIndex);
    }
    return false;
  }
1026209
public boolean isHasShardingQueryAssistedEncryptor(final String logicTableName) {
        for (ShardingEncryptorStrategy each : shardingEncryptorStrategies.values()) {
            if (each.isHasShardingQueryAssistedEncryptor(logicTableName)) {
                return true;
            }
        }
        return false;
    }
670738
function (playerCards, dealerCard, handValue, handCount, dealerCheckedBlackjack, options) 
    {
        // If exactComposition isn't set, no override
        if (options.strategyComplexity != "exactComposition")
        {
            return null;
        }

        // Now look at strategies based on game options
        if ((options.numberOfDecks == 2) && (!options.hitSoft17)) 
        {
            return TwoDeckStandSoft17(playerCards, dealerCard, handValue, handCount, dealerCheckedBlackjack, options);
        }
    }
919199
def should_execute(self):
        """"""
        return self.args.apply and (self.args.no_confirm or self.confirm_execution())
700359
def is_flag(action):
    
    action_types = [_StoreTrueAction, _StoreFalseAction, _StoreConstAction]
    return any(list(map(lambda Action: isinstance(action, Action), action_types)))
1054850
def is_check(self) -> bool:
        """"""
        king = self.king(self.turn)
        return king is not None and self.is_attacked_by(not self.turn, king)
1008530
def is_condition_met(self, hand, win_tile, melds, is_tsumo):
        
        win_tile //= 4

        open_sets = [x.tiles_34 for x in melds if x.opened]

        chi_sets = [x for x in hand if (is_chi(x) and win_tile in x and x not in open_sets)]
        pon_sets = [x for x in hand if is_pon(x)]

        closed_pon_sets = []
        for item in pon_sets:
            if item in open_sets:
                continue

            # if we do the ron on syanpon wait our pon will be consider as open
            # and it is not 789999 set
            if win_tile in item and not is_tsumo and not len(chi_sets):
                continue

            closed_pon_sets.append(item)

        return len(closed_pon_sets) == 3
1038728
def under_attack(col, queens):
        
        left = right = col
        for _, column in reversed(queens):
            left, right = left - 1, right + 1
            if column in (left, col, right):
                return True
        return False
804416
def is_zeroing(self, move: Move) -> bool:
        """"""
        return bool(BB_SQUARES[move.from_square] & self.pawns or BB_SQUARES[move.to_square] & self.occupied_co[not self.turn])
767839
public boolean checkModifier(int modifierBits) {
        // Add in the "pseudo-" modifier bit PACKAGE, if needed
        long fmod = ((modifierBits & ACCESS_BITS) == 0) ?
                        modifierBits | PACKAGE :
                        modifierBits;
        return ((oneOf == 0) || ((oneOf & fmod) != 0)) &&
                ((must & fmod) == must) &&
                ((cannot & fmod) == 0);
    }
1218812
public function isDirty() : bool
    {
        foreach ($this->__state as $prop => $val) {
            if ($this->isModified($prop)) {
                return true;
            }
        }
        return false;
    }
75795
public boolean checkExists(TriggerKey triggerKey, T jedis){
        return jedis.exists(redisSchema.triggerHashKey(triggerKey));
    }
379042
def _rook_legal_for_castle(self, rook):
        
        return rook is not None and \
            type(rook) is Rook and \
            rook.color == self.color and \
            not rook.has_moved