Use common library in Love

This commit is contained in:
Andrew Cooper
2022-03-18 07:33:28 +11:00
parent 1a8ea5aabd
commit d6ddc6bf9e
8 changed files with 116 additions and 127 deletions

View File

@@ -1,31 +1,11 @@
using System;
using System.Reflection;
using Games.Common.IO;
using Love;
using Love.Resources;
namespace Love
{
internal class Program
{
static void Main(string[] args)
{
DisplayIntro();
var io = new ConsoleIO();
var message = Input.ReadLine("Your message, please");
var pattern = new LovePattern();
io.Write(Resource.Streams.Intro);
var source = new SourceCharacters(pattern.LineLength, message);
var message = io.ReadString("Your message, please");
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);
}
}
}
io.Write(new LovePattern(message));