pub fn check_mate(&self, team: Team) -> bool {
        // Overwrite existing turn order to mimick if the player could move.
        let mut other = self.clone();
        other.turn_order = team;

        self.find_by_team_closure(team, &|sq_entity: SqEntity| -> bool {
            let sq = sq_entity.sq;
            let piece = sq_entity.entity.kind;
            let translations = piece.get_translations()(&other, sq, team, piece);
            for t in translations {
                if other.can_translate(sq, t) {
                    return false;
                }
            }
            true
        })
    }
// Assumes Team is already in check.
Assumes Team is already in check.
Assumes Team is already in check .
pub fn check_mate(&self, team: Team) -> bool {
        // Overwrite existing turn order to mimick if the player could move.
        let mut other = self.clone();
        other.turn_order = team;
        self.find_by_team_closure(team, &|sq_entity: SqEntity| -> bool {
            let sq = sq_entity.sq;
            let piece = sq_entity.entity.kind;
            let translations = piece.get_translations()(&other, sq, team, piece);
            for t in translations {
                if other.can_translate(sq, t) {
                    return false;
                }
            }
            true
        })
    }
pub fn check_mate ( & self , team : Team ) -> bool { // Overwrite existing turn order to mimick if the player could move. let mut other = self . clone ( ) ; other . turn_order = team ; self . find_by_team_closure ( team , & | sq_entity : SqEntity | -> bool { let sq = sq_entity . sq ; let piece = sq_entity . entity . kind ; let translations = piece . get_translations ( ) ( & other , sq , team , piece ) ; for t in translations { if other . can_translate ( sq , t ) { return false ; } } true } ) }
Assumes Team is already in check.
Assumes Team is already in check .
&self
team
Team
&self
team
Team