Example #1
0
 protected override void ShowState()
 {
     InfoQueue.Enqueue("State of Car");
     InfoQueue.Enqueue($"1.[Engine] {ShowInfo(Car.Engine)}");
     InfoQueue.Enqueue($"2.[Accumulator] {ShowInfo(Car.Accumulator)}");
     InfoQueue.Enqueue($"3.[Left front disk] {ShowInfo(Car.Disks[0])}");
     InfoQueue.Enqueue($"4.[Right front disk] {ShowInfo(Car.Disks[1])}");
     InfoQueue.Enqueue($"5.[Left rear disk] {ShowInfo(Car.Disks[2])}");
     InfoQueue.Enqueue($"6.[Right rear disk] {ShowInfo(Car.Disks[3])}");
 }
Example #2
0
        protected override int RequestChoice()
        {
            Choice = null;
            InfoQueue.Enqueue("1-Move");
            InfoQueue.Enqueue("2-End Game");
            InfoQueue.Enqueue("3x-Repair");
            InfoQueue.Enqueue("4x-Replace");

            while (!Choice.HasValue)
            {
                Thread.Sleep(1);
            }

            return(Choice.Value);
        }
Example #3
0
 protected override void InformRepaired()
 {
     InfoQueue.Enqueue("Repaired");
 }
Example #4
0
 protected override void InformNotRepairedBecauseOfBalance()
 {
     InfoQueue.Enqueue("Not enough money for repair");
 }
Example #5
0
 protected override void InformUnrepairable()
 {
     InfoQueue.Enqueue("Cannot repair");
 }
Example #6
0
 protected override void InformReplace()
 {
     InfoQueue.Enqueue("Replaced");
 }
Example #7
0
 protected override void InformGameStarted()
 {
     InfoQueue.Enqueue("Game started");
 }
Example #8
0
 protected override void InformBalance()
 {
     InfoQueue.Enqueue($"Your balance is:{Player.Money}");
 }
Example #9
0
 protected override void InformMoneyIsOver()
 {
     InfoQueue.Enqueue("Money is over");
 }
Example #10
0
 protected override void InformMove()
 {
     InfoQueue.Enqueue("Move");
 }
Example #11
0
 protected override void InformCantMove()
 {
     InfoQueue.Enqueue("Can't move\nRepair your car");
 }
Example #12
0
 protected override void InformNothingToDo()
 {
     InfoQueue.Enqueue("Nothing to do");
 }
Example #13
0
 protected override void InformGameOver()
 {
     InfoQueue.Enqueue("Game over");
     InfoQueue.Enqueue($"Final score is:{Car.Way}");
 }