From 026682fcda4d4113ae27ec50eb3289b037c05816 Mon Sep 17 00:00:00 2001 From: Cyl18 Date: Sun, 18 Feb 2018 03:16:02 +0800 Subject: [PATCH] fix rocket bug --- CardSharp/Rules/RuleRocket.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/CardSharp/Rules/RuleRocket.cs b/CardSharp/Rules/RuleRocket.cs index 9278be4..6968ebe 100644 --- a/CardSharp/Rules/RuleRocket.cs +++ b/CardSharp/Rules/RuleRocket.cs @@ -24,7 +24,20 @@ public override string ToString() public override (bool exists, List cards) FirstMatchedCards(List sourceGroups, List 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 + { + new Card(Constants.Cards.CGhost), + new Card(Constants.Cards.CKing) + }); + } + else + { + return default; + } } } } \ No newline at end of file