Example #1
0
    public void RequestResult()
    {
        missionController.FailMissionsOnHold();
        writer.AppendLine(OutputMessages.Result);

        writer.AppendLine(string.Format(OutputMessages.SuccessfulMissions, missionController.SuccessMissionCounter));

        writer.AppendLine(string.Format(OutputMessages.FailedMissions, missionController.FailedMissionCounter));
        writer.AppendLine(OutputMessages.Soldiers);

        foreach (var soldier in this.army.Soldiers.OrderByDescending(s => s.OverallSkill))
        {
            writer.AppendLine(soldier.ToString());
        }
    }
Example #2
0
    public void Run()
    {
        string         input          = reader.ReadLine();
        GameController gameController = new GameController(writer);

        while (!input.Equals(poolbackCommand))
        {
            try
            {
                gameController.GiveInputToGameController(input);
            }
            catch (ArgumentException arg)
            {
                writer.AppendLine(arg.Message);
            }

            input = this.reader.ReadLine();
        }

        gameController.RequestResult();

        this.writer.WriteLineAll();
    }