Files
basic-computer-games/86_Target/csharp/Target/Program.cs
Chris Reuter d26dbf036a Removed spaces from top-level directory names.
Spaces tend to cause annoyances in a Unix-style shell environment.
This change fixes that.
2021-11-21 18:30:21 -05:00

40 lines
986 B
C#

using System;
using System.Reflection;
namespace Target
{
class Program
{
static void Main(string[] args)
{
DisplayTitleAndInstructions();
var firingRange = new FiringRange();
while (true)
{
Game.Play(firingRange);
Console.WriteLine();
Console.WriteLine();
Console.WriteLine();
Console.WriteLine();
Console.WriteLine();
Console.WriteLine("Next target...");
Console.WriteLine();
firingRange.NextTarget();
}
}
private static void DisplayTitleAndInstructions()
{
using var stream = Assembly.GetExecutingAssembly()
.GetManifestResourceStream("Target.Strings.TitleAndInstructions.txt");
using var stdout = Console.OpenStandardOutput();
stream.CopyTo(stdout);
}
}
}