Example #1
0
    private void DisplayIntroduction()
    {
        _io.Write(Resource.Streams.Title);

        if (_io.ReadString("Do you want instructions").Equals("N", StringComparison.InvariantCultureIgnoreCase))
        {
            return;
        }

        _io.WriteLine(Resource.Formats.Instructions, _maxNumber, _maxGuessCount);
    }
Example #2
0
    public static Game Create(TextIO io, IRandom random)
    {
        io.Write(Resource.Streams.Introduction);

        var defense = new Defense(io.ReadDefense("Your starting defense will be"));
        var clock   = new Clock(io);

        io.WriteLine();

        var scoreboard = new Scoreboard(
            new Team("Dartmouth", new HomeTeamPlay(io, random, clock, defense)),
            new Team(io.ReadString("Choose your opponent"), new VisitingTeamPlay(io, random, clock, defense)),
            io);

        return(new Game(clock, scoreboard, io, random));
    }