Esempio n. 1
0
        public virtual bool IsPlayable(Game game)
        {
            // check that we have enough resources to play this card
            Readable_GamePlayer controller = game.Get_ReadableSnapshot(this.ControllerID);

            return(controller.Get_CurrentResources().Minus(this.cost).IsValid);
        }
Esempio n. 2
0
 public void CopyFrom(Readable_GamePlayer original)
 {
     // the hand should be small enough that we can just clone it for the moment
     this.hand.PutReadonly(original.Get_ReadableHand());
     this.Deck            = original.GetDeck().Clone();
     this.Health          = original.GetHealth();
     this.MaxHealth       = original.GetMaxHealth();
     this.NumDrawsSkipped = original.Get_NumDrawsSkipped();
     this.sourcePlayer    = original.SourcePlayer;
     this.ID = original.GetID((Readable_GamePlayer)null).ToInt();
     this.MonsterIDsInPlay = new WriteControlled_Item <IReadOnlyList <ID <Readable_MonsterCard> >, List <ID <Readable_MonsterCard> > >(new ListConverter <ID <Readable_MonsterCard> >());
     this.MonsterIDsInPlay.PutReadonly(original.Get_MonsterIDsInPlay());
     this.CurrentResources = original.Get_CurrentResources();
     this.ResourcesPerTurn = original.Get_ResourcesPerTurn();
 }