/// <summary>
        /// This method instantiate all dependencies for the game.
        /// </summary>
        public static void StartGame()
        {
            // Console context dependancies
            IConsoleWriter consoleWriter = new ConsoleWriter();
            IConsoleReader consoleReader = new ConsoleReader();

            // Instantiate game dependancies
            IRenderer renderer = new ConsoleRenderer(consoleWriter);
            IInputHandler inputHandler = new ConsoleInputHandler(consoleWriter, consoleReader);
            IFieldFactory fieldFactory = new GameFieldFactory();
            IFieldMemoryManager fieldMemoryManager = new FieldMemoryManager();
            IBalloonsFactory balloonsFactory = new BalloonsFactory();
            IFiller matrixFiller = new Filler(balloonsFactory);
            ICommandManager commandManager = new CommandManager();

            // Printing initial screen goes here.
            renderer.RenderGameMessage(GameMessages.InitialGameMessage);
            renderer.RenderCommands(GameMessages.CommandsMessages);

            // Getting mode and difficulty goes here.
            GameMode gameMode = inputHandler.GetGameMode();
            GameDifficulty gameDifficulty = inputHandler.GetGameDifficulty();

            var reorderStrategy = GetReorderStrategy(gameMode);

            // Fluent interface implementation
            IBalloonsEngine engine = new BalloonsGameEngine()
                .Renderer(renderer)
                .Input(inputHandler)
                .FieldFactory(fieldFactory)
                .FieldMemoryManager(fieldMemoryManager)
                .BalloonsFactory(balloonsFactory)
                .CommandManager(commandManager)
                .ReorderBalloonsStrategy(reorderStrategy)
                .GameFieldFiller(matrixFiller);

            engine.InitializeGame(gameDifficulty);
            engine.StartGame();
        }
        public void RenderGameMessageShuldChangeCursorColumnPosition()
        {
            var renderer = new ConsoleRenderer();

            renderer.RenderGameMessage(TestMessage);
            var expectedCursorPosition = Console.WindowWidth / 2 - TestMessage.Length / 2;
            var actualCursorPosition = Console.CursorLeft;

            Assert.AreEqual(expectedCursorPosition, actualCursorPosition);
        }
        public void RenderGameMessageShuldCallConsoleMethodWriteLineOnce()
        {
            var mockConsole = new Mock<IConsoleWriter>();
            var writer = mockConsole.Object;
            var renderer = new ConsoleRenderer(writer);

            renderer.RenderGameMessage(TestMessage);

            mockConsole.Verify(c => c.WriteLine(It.IsAny<string>()), Times.Exactly(1));
        }