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) }; }
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)); }