Skip to content

Commit

Permalink
Update canPlay.ts
Browse files Browse the repository at this point in the history
bugfix cmpCard returns integer
  • Loading branch information
tmwilliamlin168 committed Feb 16, 2021
1 parent e405a6c commit 3aad9bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/canPlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ export default function canPlay(prev: Card[] | null, cur: Card[]) {
const prevHand = parseHand(prev)!;
if (!hands[curHand.id].overrideSize && cur.length !== prev.length) return false;
if (curHand.id !== prevHand.id) return curHand.id < prevHand.id;
return cmpCard(prevHand.card, curHand.card);
return cmpCard(prevHand.card, curHand.card) < 0;
};

0 comments on commit 3aad9bd

Please sign in to comment.