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