Ejemplo n.º 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));
 }
Ejemplo n.º 2
0
 public override Moves MyMove(Moves myLastMove, Moves othersLastMove)
 {
     if (othersLastMove == Moves.D)
     {
         strategy = new Atac();
     }
     return(strategy.MoveLikeABoss(this));
 }
Ejemplo n.º 3
0
 protected override void Event2Handler()
 {
     if (!flag)
     {
         strategy = new Atac();//aleg strategia
         flag     = true;
         base.Event2Handler();
     }
 }
Ejemplo n.º 4
0
 public override Moves FirstMove()
 {
     strategy = new Atac();
     Subscribe(Ids.id1, Event1Handler);
     Invoke(Ids.id2);
     moves = 1;
     flag  = false;
     return(strategy.FirstMove());
 }
Ejemplo n.º 5
0
 public Player2()
 {
     strategy = new Atac();
 }
Ejemplo n.º 6
0
 public override Moves FirstMove()
 {
     strategy = new Atac();
     Invoke1();
     return(base.FirstMove());
 }
Ejemplo n.º 7
0
 protected override void Event1Handler()
 {
     strategy = new Atac();//aleg strategia
     base.Event1Handler();
 }