Skip to content

Instantly share code, notes, and snippets.

@ZacharyPatten
Created July 4, 2022 03:41
Show Gist options
  • Save ZacharyPatten/9a0ae6cc405bdf88023d0f1dedc7a2b0 to your computer and use it in GitHub Desktop.
Save ZacharyPatten/9a0ae6cc405bdf88023d0f1dedc7a2b0 to your computer and use it in GitHub Desktop.
using System;
using System.Threading;
int frame = 0;
string[] frames = new[]
{
@" O " + '\n' +
@" |_ " + '\n' +
@" |> " + '\n' +
@" /| ",
// 1
@" O " + '\n' +
@" <|L " + '\n' +
@" |_ " + '\n' +
@" |/ ",
// 2
@" O " + '\n' +
@" L|L " + '\n' +
@" |_ " + '\n' +
@" / | ",
// 3
@" _O " + '\n' +
@" | |L " + '\n' +
@" /─ " + '\n' +
@" / \ ",
// 4
@" __O " + '\n' +
@" / /\_ " + '\n' +
@"__/\ " + '\n' +
@" \ ",
// 5
@" _O " + '\n' +
@" |/|_ " + '\n' +
@" /\ " + '\n' +
@" / | ",
// 6
@" O " + '\n' +
@" </L " + '\n' +
@" \ " + '\n' +
@" /| ",
};
while (!Console.KeyAvailable || Console.ReadKey(true).Key is not ConsoleKey.Escape)
{
frame = (frame + 1) % frames.Length;
Console.CursorVisible = false;
Console.SetCursorPosition(0, 0);
Console.Write(frames[frame]);
Thread.Sleep(TimeSpan.FromMilliseconds(66));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment