protected override void GoHomeWobbling() { var r = new Random(); while (Console.CursorTop < 20) { Thread.Sleep(500); var maxSteps = DrunkLevel.CalculateMaxSteps(); Movements.MoveRight(r.Next(1, maxSteps)); Movements.MoveDown(r.Next(1, maxSteps)); Movements.MoveLeft(r.Next(1, maxSteps)); Movements.MoveDown(r.Next(1, maxSteps)); } }
private void DoFinalSteps() { var xDiff = Console.CursorLeft - 20; if (xDiff > 0) { Movements.MoveLeft(xDiff); } else if (xDiff < 0) { Movements.MoveRight(-xDiff); } Console.Write("X"); Console.CursorLeft--; }