private static void Main(string[] args) { GameInteraction gi = new GameInteraction(new ConsoleIOController()); gi.StartInteractiveLudoGame(); gi.ChooseMenuOption(); Console.WriteLine("Game over!! Press any key!"); Console.ReadKey(); }
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 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]); }