public void PlayerGetsWelcomeMessage()
        {
            //Arrange
            var gameIo = new ListIOController();

            gameIo.Actions = new List <object>();
            GameInteraction gi = new GameInteraction(gameIo);

            //Act
            gi.StartInteractiveLudoGame();

            //Assert
            Assert.Equal("Welcome to Ludo game", gameIo.Messages[0]);
        }
        public void LoadUnifinishedGame()
        {
            //As a ludo-player, I want to be able to load an unfinished game, to continue playing that game.

            //Arrange
            var gameIo = new ListIOController();

            gameIo.Actions = new List <object>()
            {
                0, 2, "MyFirstPlayer", "Red", "MySecondPlayer", "Green"
            };
            GameInteraction gi = new GameInteraction(gameIo);

            gi.StartInteractiveLudoGame();
            gi.ChooseMenuOption();
        }
        public void PossibleToSetNameAndColor()
        {
            //As a ludo-player I want to set my name and color when joining a new game
            var gameIo = new ListIOController();

            gameIo.Actions = new List <object>()
            {
                2, "Andre", "Red", "Morad", "Blue"
            };
            GameInteraction gi = new GameInteraction(gameIo);

            gi.ChooseMenuOption();

            Assert.Equal("Andre", gi.players[0].PlayerName);
            Assert.Equal("Red", gi.players[0].Color);
        }
        public void ShowGameHistory()
        {
            //As a ludo-player, I want to be able look at game-history, to see past games.
            //Arrange
            var             gameIo = new ListIOController();
            GameInteraction gi     = new GameInteraction(gameIo);

            //Act
            gameIo.Actions = new List <object>()
            {
                0, 2, "MyFirstPlayer", "Red", "MySecondPlayer", "Green"
            };
            gi.StartInteractiveLudoGame();
            gi.ChooseMenuOption();
            gi.ShowGameHistory();

            //Assert
            Assert.StartsWith("Showing your game history from with ID: ", gameIo.Messages[13]);
        }
        public void CanStartNewGameWithTwoPlayers()
        {
            //Arrange
            var gameIo = new ListIOController();

            gameIo.Actions = new List <object>()
            {
                0, 2, "MyFirstPlayer", "Red", "MySecondPlayer", "Green"
            };
            GameInteraction gi = new GameInteraction(gameIo);

            //Act
            gi.StartInteractiveLudoGame();
            gi.ChooseMenuOption();

            //Assert
            Assert.StartsWith("Your new game have ID:", gameIo.Messages[12]);

            //As a ludo-player I want to be able to start a new ludo game where all peices are at the inital positons
        }
        public void PlayerGetsInitialOptions()
        {
            //Arrange
            var gameIo = new ListIOController();

            gameIo.Actions = new List <object>()
            {
                0
            };
            GameInteraction gi = new GameInteraction(gameIo);

            //Act
            gi.StartInteractiveLudoGame();

            //Assert
            Assert.Equal("[0] Start a new game", gameIo.Messages[1]);
            Assert.Equal("[1] Load a game", gameIo.Messages[2]);
            Assert.Equal("[2] Show history", gameIo.Messages[3]);
            Assert.Equal("Choose a option:", gameIo.Messages[4]);
        }