private static void HandleKeystrokes(PickingProcess pickingProcess) { var currentAngle = pickingProcess.ActivePicklock.TiltAngle; // ReSharper disable once SwitchStatementMissingSomeEnumCasesNoDefault switch (Console.ReadKey().Key) { case ConsoleKey.LeftArrow: Console.Write("\b"); pickingProcess.ChangePicklockAngle(currentAngle - StepForAngle); break; case ConsoleKey.RightArrow: Console.Write("\b"); pickingProcess.ChangePicklockAngle(currentAngle + StepForAngle); break; case ConsoleKey.Enter: pickingProcess.Pick(); break; default: Console.Write("\b"); break; } }
public void Update(PickingProcess pickingProcess) { var picklocksQuantity = new[] { pickingProcess.Player.PicklocksQuantity }; var tiltAngle = new[] { pickingProcess.ActivePicklock.TiltAngle }; _playerInfo.Print(picklocksQuantity); _picklockInfo.Print(tiltAngle); }
public void Initialize(PickingProcess pickingProcess) { var picklocksQuantity = new[] { pickingProcess.Player.PicklocksQuantity }; var tiltAngle = new[] { pickingProcess.ActivePicklock.TiltAngle }; _playerInfo.Print(picklocksQuantity); _picklockInfo.Print(tiltAngle); Console.WriteLine("--------------------------------------------------------"); }