- underCheck(color) {
- const kingPos = this.searchKingPos(color)[0],
- return (this.underAttack(kingPos, 'w') || this.underAttack(kingPos, 'b'));
+ underCheck(square_s) {
+ return (
+ this.underAttack(square_s[0], 'w') ||
+ this.underAttack(square_s[0], 'b')
+ );