Beispiel #1
0
 public override void OnSelectCards(Interactions.SelectCards io)
 {
     var respond = m_playingBack.ReadLine().Split(new char[] { ':' }, StringSplitOptions.RemoveEmptyEntries);
     if (respond[0] == "se")
     {
         if (respond[1] == "null")
         {
             io.Respond(null);
         }
         else
         {
             CardInstance[] cards = new CardInstance[respond.Length - 1];
             for (int i = 1; i < respond.Length; ++i)
             {
                 cards[i - 1] = io.Candidates.First(c => c.Guid == Int32.Parse(respond[i]));
             }
             io.Respond(cards.ToIndexable());
         }
     }
     else
     {
         throw new NotSupportedException(String.Format("Unrecognized verb {0}", respond[0]));
     }
 }