static string shipForm = "(O)";
static int shipPositionX = Console.WindowWidth / 2 - 2;
static int shipPositionY = Console.WindowHeight - 1;
if (shipPositionX + shipForm.Length < Console.WindowWidth)
static void SetConsoleParameters()
Console.BufferHeight = Console.WindowHeight;
Console.BufferWidth = Console.WindowWidth;
Console.Title = "Falling Rocks";
static void DrawShip(int x, int y)
Console.ForegroundColor = ConsoleColor.DarkYellow;
Console.SetCursorPosition(x, y);
if (Console.KeyAvailable)
ConsoleKeyInfo pressedKey = Console.ReadKey();
if (pressedKey.Key == ConsoleKey.LeftArrow)
else if (pressedKey.Key == ConsoleKey.RightArrow)
DrawShip(shipPositionX, shipPositionY);