Example #1
0
 /// <summary>
 /// Event handler for when a player empties their hand during a bout.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnHandEmpty(object sender, GameLogEventArgs e)
 {
     if (sender == Attacker)
     {
         Winner = Attacker;
     }
     else if (sender == Defender)
     {
         Winner = Defender;
     }
 }
Example #2
0
 protected virtual void OnNewBout(GameLogEventArgs l)
 {
     NewBout?.Invoke(this, l);
 }
Example #3
0
 protected virtual void OnEnd(GameLogEventArgs l)
 {
     this.IsOver = true;
     End?.Invoke(this, l);
 }
Example #4
0
 /// <summary>
 /// Simple output method to use in place of a game log for the next two tests
 /// </summary>
 static void _SpitToOutput(object sender, GameLogEventArgs e)
 {
     Console.WriteLine(e.Message);
     //Console.ReadKey();
 }
Example #5
0
 protected virtual void OnDefend(GameActionEventArgs a, GameLogEventArgs l)
 {
     Defend?.Invoke(this, a);
     DefendLog?.Invoke(this, l);
 }
Example #6
0
 protected virtual void OnAttack(GameActionEventArgs a, GameLogEventArgs l)
 {
     Attack?.Invoke(this, a);
     AttackLog?.Invoke(this, l);
 }
Example #7
0
 protected virtual void OnHandEmpty(GameLogEventArgs l)
 {
     IsActive = false;
     HandEmpty?.Invoke(this, l);
 }
Example #8
0
 protected virtual void OnPickUp(GameLogEventArgs l)
 {
     PickUp?.Invoke(this, l);
 }
Example #9
0
 protected virtual void OnConcede(GameLogEventArgs l)
 {
     Concede?.Invoke(this, l);
 }
Example #10
0
 protected virtual void OnEnd(GameLogEventArgs l)
 {
     End?.Invoke(this, l);
 }
Example #11
0
 protected virtual void OnReport(GameLogEventArgs l)
 {
     Report?.Invoke(this, l);
 }