mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 23:26:40 -08:00
27 lines
610 B
C#
27 lines
610 B
C#
using BugGame.Resources;
|
|
using Games.Common.IO;
|
|
using Games.Common.Randomness;
|
|
|
|
namespace BugGame;
|
|
|
|
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(Resource.Streams.Introduction);
|
|
var response = _io.ReadString("Do you want instructions");
|
|
if (!response.Equals("no", StringComparison.InvariantCultureIgnoreCase))
|
|
{
|
|
_io.Write(Resource.Streams.Instructions);
|
|
}
|
|
}
|
|
} |