Commit 40396fbd authored by mercury233's avatar mercury233

fix

parent 0e54b3fd
......@@ -458,18 +458,6 @@ namespace WindBot.Game
}
}
// try all
int s1 = 0, s2 = 0;
foreach (ClientCard card in cards)
{
s1 += card.OpParam1;
s2 += (card.OpParam2 != 0) ? card.OpParam2 : card.OpParam1;
}
if (s1 >= sum || s2 >= sum)
{
return cards;
}
// try all combinations
int i = (min <= 1) ? 2 : min;
while (i <= max && i <= cards.Count)
......@@ -479,8 +467,7 @@ namespace WindBot.Game
foreach (IEnumerable<ClientCard> combo in combos)
{
Logger.DebugWriteLine("----");
s1 = 0;
s2 = 0;
int s1 = 0, s2 = 0;
foreach (ClientCard card in combo)
{
s1 += card.OpParam1;
......
......@@ -979,6 +979,9 @@ namespace WindBot.Game
int sumval = packet.ReadInt32();
int min = packet.ReadByte();
int max = packet.ReadByte();
if (max <= 0)
max = 99;
IList<ClientCard> mandatoryCards = new List<ClientCard>();
IList<ClientCard> cards = new List<ClientCard>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment