Ejemplo n.º 1
0
 public StatusObject keepOrDiscardSpiedCards(List<Card> discard)
 {
     StatusObject o = new StatusObject(false);
     for (int i = 0; i < discard.Count; i++)
     {
         Player p = PlayerGetPlayerInList(i);
         if (discard[i] != null && !p.getDeck().peekAtTopCard().Equals(discard[i]))
         {
             return o;
         }
     }
     for (int i = 0; i < discard.Count; i++)
     {
         Player p = PlayerGetPlayerInList(i);
         if (discard[i] != null && p.getDeck().peekAtTopCard().Equals(discard[i]))
         {
             p.getDeck().discard(p.getDeck().draw());
         }
     }
     o.setSpiedSuccessfully(true);
     return o;
 }