public TakeCardBackCommand(CardLogic cl, GameObject card, Player p) { this.cl = cl; this.p = p; this.card = card; Debug.Log("Creating TakeCardBackCommand with cl: " + cl.ToString() + " p: " + p.ToString() + " card: " + card.ToString()); }
public void PlayCards(List <CardLogic> newCards) { Debug.Log("in PlayCards."); if (newCards.Count != 2) { Debug.LogError("ERROR: NetworkPlayer tried to PlayCards with " + newCards.Count + " cards"); //TODO: Make this fix the problem. } else { if (cardsPlayed != null && cardsPlayed.Count > 0) { while (cardsPlayed.Count > 0) { CardLogic card = cardsPlayed[0]; GameManager.Instance.DiscardItem(card); Debug.Log("Discarding Card: " + card.ToString()); cardsPlayed.Remove(card); } } foreach (CardLogic card in newCards) { cardsPlayed.Add(card); } if (cardsPlayed.Count != 2) { Debug.LogError("ERROR: After PlayCards, list of cardsPlayed.Count = " + cardsPlayed.Count); } } }
public void dealNewAdventurer() { if (currentAdventurerCard != null && currentAdventurerCard.ca != null) { Debug.Log("dealNewAdventurer adventurerDiscard: " + adventurerDiscard.ToString()); Debug.Log("currentAdventurer: " + currentAdventurerCard.ToString()); Debug.Log("currentAdventurer.ca : " + currentAdventurerCard.ca.ToString()); adventurerDiscard.returnToDeck(currentAdventurerCard.ca); } currentAdventurerCard = adventurerDeck.DealCard(); }