Simplify Love (C#) folder structure

This commit is contained in:
Zev Spitz
2022-01-17 11:12:56 +02:00
parent 3eed84264f
commit df8269fd0c
7 changed files with 11 additions and 20 deletions

31
58_Love/csharp/Program.cs Normal file
View File

@@ -0,0 +1,31 @@
using System;
using System.Reflection;
namespace Love
{
internal class Program
{
static void Main(string[] args)
{
DisplayIntro();
var message = Input.ReadLine("Your message, please");
var pattern = new LovePattern();
var source = new SourceCharacters(pattern.LineLength, message);
using var destination = Console.OpenStandardOutput();
pattern.Write(source, destination);
}
private static void DisplayIntro()
{
using var stream = Assembly.GetExecutingAssembly()
.GetManifestResourceStream("Love.Strings.Intro.txt");
using var stdout = Console.OpenStandardOutput();
stream.CopyTo(stdout);
}
}
}