Commit 8392e62e authored by mercury233's avatar mercury233

fix CheckSelectCount

parent 06be1a9d
...@@ -434,6 +434,15 @@ namespace WindBot.Game.AI ...@@ -434,6 +434,15 @@ namespace WindBot.Game.AI
if (selected.Count >= max) if (selected.Count >= max)
break; break;
} }
if (selected.Count < min)
{
#if DEBUG
throw new Exception("Not enough cards to CheckSelectCount");
#else
Logger.WriteErrorLine("Not enough cards to CheckSelectCount, using default");
return null;
#endif
}
} }
while (selected.Count > max) while (selected.Count > max)
{ {
......
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