mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 07:10:42 -08:00
28 lines
602 B
C#
28 lines
602 B
C#
using System;
|
|
using Tower.Resources;
|
|
using Tower.UI;
|
|
|
|
namespace Tower
|
|
{
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
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);
|
|
}
|
|
}
|
|
}
|