Add Program and Game class

This commit is contained in:
Andrew Cooper
2022-07-23 18:42:03 +10:00
parent dbeeae8154
commit d1cf340e9f
2 changed files with 26 additions and 0 deletions

18
30_Cube/csharp/Game.cs Normal file
View File

@@ -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);
}
}

View File

@@ -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();