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)); }
protected override void Event2Handler() { if (!flag) { strategy = new Atac();//aleg strategia flag = true; base.Event2Handler(); } }
public override Moves FirstMove() { strategy = new Atac(); Subscribe(Ids.id1, Event1Handler); Invoke(Ids.id2); moves = 1; flag = false; return(strategy.FirstMove()); }
public Player2() { strategy = new Atac(); }
public override Moves FirstMove() { strategy = new Atac(); Invoke1(); return(base.FirstMove()); }
protected override void Event1Handler() { strategy = new Atac();//aleg strategia base.Event1Handler(); }