public void AddUnit(CardImpl card, OrientedCell new_cell) { var command = commands [cur_command_idx]; if (new_cell != null) { UnitImpl unit = new UnitImpl(card, cur_command_idx, new_cell); SetUnitPlace(new_cell, unit); command.staff.Add(unit); if (notificator != null) { notificator.UnitAdded(unit); } } command.hand.Remove(card); command.crystals_count -= card.cost; if (notificator != null) { notificator.PlayerUIUpdated(); } }
public void DrawCard() { if (deck.Count > 0) { CardImpl card = deck [0]; deck.Remove(card); hand.Add(card); } }
public CardImpl(CardImpl other) : base(other) { }