机器人判断是否吃牌, 优先判断出的牌是否是点数牌

This commit is contained in:
zhl 2020-12-21 11:07:46 +08:00
parent 25602c4885
commit fff7e01351
2 changed files with 2 additions and 2 deletions

View File

@ -180,7 +180,7 @@ export class Robot {
let cardArr = [...this.player.cards.values()];
let tmpCards = assistantUtil.checkTriple(cardArr, targetCard);
let next = this.giveup.bind(this);
if (tmpCards.length > 1) {
if (tmpCards.length > 1 && targetCard.type === 1) {
let cardIds: number[] = [];
for (let card of tmpCards) {
if (card.id !== targetCard.id) {

View File

@ -157,7 +157,7 @@ export class RobotClient implements Client {
let cardArr = [...this.selfPlayer.cards.values()];
let tmpCards = assistantUtil.checkTriple(cardArr, targetCard);
let next = this.giveup.bind(this);
if (tmpCards.length > 1) {
if (tmpCards.length > 1 && targetCard.type === 1) {
let cardIds: number[] = [];
for (let card of tmpCards) {
if (card.id !== targetCard.id) {