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])}"); }
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); }
protected override void InformRepaired() { InfoQueue.Enqueue("Repaired"); }
protected override void InformNotRepairedBecauseOfBalance() { InfoQueue.Enqueue("Not enough money for repair"); }
protected override void InformUnrepairable() { InfoQueue.Enqueue("Cannot repair"); }
protected override void InformReplace() { InfoQueue.Enqueue("Replaced"); }
protected override void InformGameStarted() { InfoQueue.Enqueue("Game started"); }
protected override void InformBalance() { InfoQueue.Enqueue($"Your balance is:{Player.Money}"); }
protected override void InformMoneyIsOver() { InfoQueue.Enqueue("Money is over"); }
protected override void InformMove() { InfoQueue.Enqueue("Move"); }
protected override void InformCantMove() { InfoQueue.Enqueue("Can't move\nRepair your car"); }
protected override void InformNothingToDo() { InfoQueue.Enqueue("Nothing to do"); }
protected override void InformGameOver() { InfoQueue.Enqueue("Game over"); InfoQueue.Enqueue($"Final score is:{Car.Way}"); }