Beispiel #1
0
 public override Moves MyMove(Moves myLastMove, Moves othersLastMove)
 {
     if (moves == 1)
     {
         Unsubscribe(Ids.id2);
     }
     else if (this.hisLastMove != othersLastMove)
     {
         changes++;
         if (changes == 3)
         {
             Console.WriteLine("I think the other plays random");
         }
         else if (changes > 3)
         {
             Console.WriteLine("The other plays random" + new string('!', changes - 3));
         }
     }
     StoreMoves(myLastMove, othersLastMove);
     if (othersLastMove == Moves.D)
     {
         strategy = new Atac();
     }
     return(strategy.MoveLikeABoss(this));
 }
 public override Moves MyMove(Moves myLastMove, Moves othersLastMove)
 {
     if (othersLastMove == Moves.D)
     {
         strategy = new Atac();
     }
     return(strategy.MoveLikeABoss(this));
 }
Beispiel #3
0
 protected override void Event2Handler()
 {
     if (!flag)
     {
         strategy = new Atac();//aleg strategia
         flag     = true;
         base.Event2Handler();
     }
 }
Beispiel #4
0
 public override Moves FirstMove()
 {
     strategy = new Atac();
     Subscribe(Ids.id1, Event1Handler);
     Invoke(Ids.id2);
     moves = 1;
     flag  = false;
     return(strategy.FirstMove());
 }
Beispiel #5
0
 public Player2()
 {
     strategy = new Atac();
 }
Beispiel #6
0
 public override Moves FirstMove()
 {
     strategy = new Atac();
     Invoke1();
     return(base.FirstMove());
 }
 protected override void Event1Handler()
 {
     strategy = new Atac();//aleg strategia
     base.Event1Handler();
 }