public bool ExecuteAttackOrder(IAttacker attacker, IAttacker target) { var args = new AttackOrderEventArgs(this, attacker, target); AttackOrderEvent.Call(args); return(args.succesful); }
public Player(string name, Card[] deck) { this.name = name; this.deck = new Deck(deck, this); hand = new Hand(this); field = new Field(this); grave = new Grave(this); DrawEvent.Subscribe(this, 0, Draw); PlayCardEvent.Subscribe(this, 0, Play); AttackOrderEvent.Subscribe(this, 0, AttackOrder); AttackEvent.Subscribe(this, 0, Attack); DamageEvent.Subscribe(this, 0, Damage); DeathEvent.Subscribe(this, 0, Death); }