Skip to content
This repository has been archived by the owner on Jul 27, 2018. It is now read-only.

Commit

Permalink
fix rocket bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyl18 committed Feb 17, 2018
1 parent 8c4c138 commit 026682f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion CardSharp/Rules/RuleRocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,20 @@ public override string ToString()
public override (bool exists, List<Card> cards) FirstMatchedCards(List<CardGroup> sourceGroups,
List<CardGroup> lastCardGroups)
{
return (false, null);
var gr = sourceGroups.Any(g => g.Amount == Constants.Cards.CGhost) &&
sourceGroups.Any(g => g.Amount == Constants.Cards.CKing);
if (gr)
{
return (true, new List<Card>
{
new Card(Constants.Cards.CGhost),
new Card(Constants.Cards.CKing)
});
}
else
{
return default;
}
}
}
}

0 comments on commit 026682f

Please sign in to comment.