diff --git a/ShiftCipher/.vs/ShiftCipher/v17/.suo b/ShiftCipher/.vs/ShiftCipher/v17/.suo index 8a4772e..8fd6dfd 100644 Binary files a/ShiftCipher/.vs/ShiftCipher/v17/.suo and b/ShiftCipher/.vs/ShiftCipher/v17/.suo differ diff --git a/ShiftCipher/Program.cs b/ShiftCipher/Program.cs deleted file mode 100644 index b73d11b..0000000 --- a/ShiftCipher/Program.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; - -namespace CorgiCoder.ShiftCipher; - -public class ShiftSerializer -{ - static ShiftSerializer() - { - Console.WriteLine("Loaded"); - } - - public ShiftSerializer() - { - - } -} diff --git a/ShiftCipher/ShiftSerializer.cs b/ShiftCipher/ShiftSerializer.cs new file mode 100644 index 0000000..5c18af7 --- /dev/null +++ b/ShiftCipher/ShiftSerializer.cs @@ -0,0 +1,306 @@ +using System; +using System.Runtime.CompilerServices; + +namespace CorgiCoder.ShiftCipher; + +public class ShiftSerializer +{ + public ShiftSerializerOptions Options { get; private init; } + + static ShiftSerializer() + { + // Print the logo! That's the most important part. + // This is the best way I, CorgiCoder, can think of to do this. + string[] textElements1 = new string[] + { + """ + ██████ + ██ ██ + ██ + ██ + ██ + ██ + ██ ██ + ██████ + """, + """ + + + + ██████ + ██ ██ + ██ ██ + ██ ██ + ██████ + """, + """ + + + + ██ ████ + ████ + ██ + ██ + ██ + """, + """ + + ██████ + ██ ██ + ██ ██ + ██████ + ██ + ██ ██ + ██████ + """, + """ + + + + ██ + + ██ + ██ + ██ + """, + """ + ██████ + ██ ██ + ██ + ██ + ██ + ██ + ██ ██ + ██████ + """, + """ + + + + ██████ + ██ ██ + ██ ██ + ██ ██ + ██████ + """, + """ + ██ + ██ + ██ + ████████ + ██ ██ + ██ ██ + ██ ██ + ████████ + """, + """ + + + + ██████ + ██ ██ + ████████ + ██ + ██████ + """, + """ + + + + ██ ████ + ████ + ██ + ██ + ██ + """, + """ + ██ + ██ + ██ + + + + + + """, + """ + + + + ██████ + ██ + ██████ + ██ + ██████ + """ + }; + string[] textElements2 = new string[] + { + """ + ██████ + ██ ██ + ██ + ██ + ██ + ██ + ██ ██ + ██████ + """, + """ + + + + ██████ + ██ ██ + ██ ██ + ██ ██ + ██████ + """, + """ + + + + ██ ████ + ████ + ██ + ██ + ██ + """, + """ + + ██████ + ██ ██ + ██ ██ + ██████ + ██ + ██ ██ + ██████ + """, + """ + + + + ██ + + ██ + ██ + ██ + """, + """ + ██████ + ██ ██ + ██ + ██ + ██ + ██ + ██ ██ + ██████ + """, + """ + + + + ██████ + ██ ██ + ██ ██ + ██ ██ + ██████ + """, + """ + ██ + ██ + ██ + ████████ + ██ ██ + ██ ██ + ██ ██ + ████████ + """, + """ + + + + ██████ + ██ ██ + ████████ + ██ + ██████ + """, + """ + + + + ██ ████ + ████ + ██ + ██ + ██ + """, + """ + ██ + ██ + ██ + + + + + + """, + """ + + + + ██████ + ██ + ██████ + ██ + ██████ + """ + }; + ConsoleColor[] colors = { ConsoleColor.Red, ConsoleColor.DarkYellow, ConsoleColor.Yellow, + ConsoleColor.DarkGreen, ConsoleColor.Green, ConsoleColor.Cyan, + ConsoleColor.DarkCyan, ConsoleColor.Blue, ConsoleColor.DarkBlue, + ConsoleColor.Magenta, ConsoleColor.DarkMagenta, ConsoleColor.DarkRed }; + + // Stay tuned on CorgiCoder's Shift Cipher! + int position = 0; + for (int i = 0; i < textElements1.Length; i++) + { + int maxLength = 0; + string[] lines = textElements1[i].Split('\n'); + Console.ForegroundColor = colors[i % colors.Length]; + for (int j = 0; j < lines.Length; j++) + { + Console.SetCursorPosition(position, j); + Console.WriteLine(lines[j]); + if (maxLength < lines[j].Length) maxLength = lines[j].Length; + } + if (i < textElements1.Length - 1) position += maxLength; + } + + position = 0; + for (int i = 0; i < textElements1.Length; i++) + { + int maxLength = 0; + string[] lines = textElements1[i].Split('\n'); + + Console.ForegroundColor = colors[i % colors.Length]; + for (int j = 0; j < lines.Length; j++) + { + Console.SetCursorPosition(position, j + textElements1.Length + 1); + Console.WriteLine(lines[j]); + if (maxLength < lines[j].Length) maxLength = lines[j].Length; + } + if (i < textElements1.Length - 1) position += maxLength; + } + Console.ResetColor(); + } + + private ShiftSerializer(ShiftSerializerOptions options) + { + Options = options; + } + + public static ShiftSerializer Create(ShiftSerializerOptions options) => new(options); + public static ShiftSerializer CreateDefault() => new(new()); +} diff --git a/ShiftCipher/ShiftSerializerOptions.cs b/ShiftCipher/ShiftSerializerOptions.cs new file mode 100644 index 0000000..aef099a --- /dev/null +++ b/ShiftCipher/ShiftSerializerOptions.cs @@ -0,0 +1,13 @@ +namespace CorgiCoder.ShiftCipher; + +public record class ShiftSerializerOptions +{ + public static readonly ShiftSerializerOptions Default = new(); + + public int offsetCount; + + public ShiftSerializerOptions() + { + offsetCount = 0; + } +} diff --git a/Testing/Program.cs b/Testing/Program.cs index 2484653..d909d89 100644 --- a/Testing/Program.cs +++ b/Testing/Program.cs @@ -6,6 +6,6 @@ public static class Program { public static void Main() { - ShiftSerializer shift = new(); + ShiftSerializer shift = ShiftSerializer.CreateDefault(); } }