From d1cf340e9fe626e67ad939e9d8ddb95abc42d285 Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Sat, 23 Jul 2022 18:42:03 +1000 Subject: [PATCH] Add Program and Game class --- 30_Cube/csharp/Game.cs | 18 ++++++++++++++++++ 30_Cube/csharp/Program.cs | 8 ++++++++ 2 files changed, 26 insertions(+) create mode 100644 30_Cube/csharp/Game.cs create mode 100644 30_Cube/csharp/Program.cs diff --git a/30_Cube/csharp/Game.cs b/30_Cube/csharp/Game.cs new file mode 100644 index 00000000..f02fa07e --- /dev/null +++ b/30_Cube/csharp/Game.cs @@ -0,0 +1,18 @@ +namespace Cube; + +internal class Game +{ + private readonly IReadWrite _io; + private readonly IRandom _random; + + public Game(IReadWrite io, IRandom random) + { + _io = io; + _random = random; + } + + public void Play() + { + _io.Write(Streams.Introduction); + } +} \ No newline at end of file diff --git a/30_Cube/csharp/Program.cs b/30_Cube/csharp/Program.cs new file mode 100644 index 00000000..f22208ac --- /dev/null +++ b/30_Cube/csharp/Program.cs @@ -0,0 +1,8 @@ +global using Games.Common.IO; +global using Games.Common.Randomness; + +global using static Cube.Resources.Resource; + +using Cube; + +new Game(new ConsoleIO(), new RandomNumberGenerator()).Play();