예제 #1
0
 private void TakeEntityInHand([NotNull] DataEntity entity, int amount = 1)
 {
     if (amount <= 0)
     {
         throw new ArgumentOutOfRangeException(nameof(amount));
     }
     if (!HandData.IsEmpty)
     {
         throw new Exception("Hand already full!");
     }
     HandData.EntitySource          = entity;
     HandData.DataEntityHand        = entity.Copy();
     HandData.DataEntityHand.Amount = 0;
     AddAmountInHand(amount);
 }