Add game logic and fix resources

This commit is contained in:
Andrew Cooper
2021-11-27 22:53:17 +11:00
parent 26374f143c
commit 9d7a904e68
14 changed files with 144 additions and 24 deletions

View File

@@ -1,4 +1,6 @@
using System;
using Tower.Resources;
using Tower.UI;
namespace Tower
{
@@ -6,7 +8,20 @@ namespace Tower
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
Console.Write(Strings.Title);
do
{
Console.Write(Strings.Intro);
if (!Input.TryReadNumber(Prompt.DiskCount, out var diskCount)) { return; }
var game = new Game(diskCount);
if (!game.Play()) { return; }
} while (Input.ReadYesNo(Strings.PlayAgainPrompt, Strings.YesNoPrompt));
Console.Write(Strings.Thanks);
}
}
}