Checks that a move is on an empty space, not on ko, and not suicide
557583
def is_move_legal(self, move):
        ''
        if move is None:
            return True
        if self.board[move] != EMPTY:
            return False
        if move == self.ko:
            return False
        if self.is_move_suicidal(move):
            return False

        return True
564329
def ignorespace(self):
        '''
        
        '''

        while True:

            self.ignore(whitespace)

            if self.nextstr('//'):
                self.noms(until='\n')
                continue

            if self.nextstr('/*'):
                self.expect('*/')
                continue

            break
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))
898232
def is_empty(self):
        ''''''
        return not bool(self.title or self.subtitle or self.part_number \
                        or self.part_name or self.non_sort or self.type)
202377
function isEmpty(val) {
  return _.isNull(val) || _.isUndefined(val) || _.isNaN(val) || helper.isBlank(val);
}
311949
def empty(cls: Type[BoardT], *, chess960: bool = False) -> BoardT:
        """"""
        return cls(None, chess960=chess960)
348068
def is_checkmate(position, input_color):
    
    return position.no_moves(input_color) and \
        position.get_king(input_color).in_check(position)
1257426
def _check_kets(*ops, same_space=False, disjunct_space=False):
    """"""
    if not all([(isinstance(o, State) and o.isket) for o in ops]):
        raise TypeError("All operands must be Kets")
    if same_space:
        if not len({o.space for o in ops if o is not ZeroKet}) == 1:
            raise UnequalSpaces(str(ops))
    if disjunct_space:
        spc = TrivialSpace
        for o in ops:
            if o.space & spc > TrivialSpace:
                raise OverlappingSpaces(str(ops))
            spc *= o.space
743914
def _check_not_empty(string):
    
    string = string.strip()

    if len(string) == 0:
        message = 'The string should not be empty'
        raise pp.ParseException(message)
383425
def get_checks(self, position=None):
        """"""
        if position is None:
            position = self.position
        return self.checkdefs[position][0]
352311
function isSpace(c)
{
	return (c === 0x20) ||
	    (c >= 0x0009 && c <= 0x000d) ||
	    (c === 0x00a0) ||
	    (c === 0x1680) ||
	    (c === 0x180e) ||
	    (c >= 0x2000 && c <= 0x200a) ||
	    (c === 0x2028) ||
	    (c === 0x2029) ||
	    (c === 0x202f) ||
	    (c === 0x205f) ||
	    (c === 0x3000) ||
	    (c === 0xfeff);
}
624932
function checkAppear() {
        if(scroll.delta < opts.delta.speed) {
          if(!deltaSet) {
            deltaSet = true;
            doCheckAppear();
            setTimeout(function(){
              deltaSet = false;
            }, opts.delta.timeout);
          }
        }
        (debounce(function() {
          doCheckAppear();
        }, opts.debounce)());
      }
224629
def check_return_space(event, callable_):
    """"""
    if event.type() == QEvent.KeyPress:
        if event.key() in [Qt.Key_Return, Qt.Key_Space]:
            callable_()
            return True
    return False
201450
def star_sep_check(self, original, loc, tokens):
        """"""
        return self.check_py("3", "keyword-only argument separator (add 'match' to front to produce universal code)", original, loc, tokens)
442059
def is_blankspace(self, char):
        
        if len(char) > 1:
            raise TypeError("Expected a char.")
        if char in self.blankspaces:
            return True
        return False
766040
static boolean isEmptyWhitespace(@Nullable final String s) {
        if (s == null) {
            return true;
        }
        return CharMatcher.WHITESPACE.matchesAllOf(s);
    }
707015
def _is_en_passant_valid(self, opponent_pawn_location, position):
        
        try:
            pawn = position.piece_at_square(opponent_pawn_location)
            return pawn is not None and \
                isinstance(pawn, Pawn) and \
                pawn.color != self.color and \
                position.piece_at_square(opponent_pawn_location).just_moved_two_steps
        except IndexError:
            return False