public void CreatePlayersAndCards()
 {
     player1 = new Player("Player1");
     player2 = new Player("Player2");
     attack  = CardFactory.Create(CardType.Attack);
     defense = CardFactory.Create(CardType.Defense);
     revive  = CardFactory.Create(CardType.Revive);
     block   = CardFactory.Create(CardType.Block);
 }
 public Player(string name)
 {
     Name  = name;
     HP    = 50;
     Mana  = 10;
     Cards = new List <Card> {
         CardFactory.Create(CardType.Attack)
     };
 }
示例#3
0
 public Player(string name)
 {
     Name  = name;
     HP    = 50;
     Mana  = 10;
     Cards = new List <Card>();
     for (int i = 0; i < NumberOfInitialCards; i++)
     {
         Cards.Add(CardFactory.Create((CardType)random.Next(4)));
     }
     Console.WriteLine("Player " + name + " has the following cards: " + string.Join(", ", Cards));
 }