/// <summary> /// LabyrinthGame consturctor /// <remarks> /// Will initiate the console renderer and all other required classes /// </remarks> /// </summary> public LabyrinthGame() { this.Renderer = new ConsoleRenderer(); this.commander = new Commander(); this.Scores = ScoreBoardCreator.CreateScoreBoard(); this.Player = PlayerCreator.CreatePlayer(); this.Maze = this.InitMaze(); }
/// <summary> /// Start the game /// <remarks> /// Will initiate all required classes and loop until forced to exit /// </remarks> /// </summary> public void Start() { while (!this.commander.IsExitCommandEntered) { this.commander = new Commander(); this.mazeFactory.GenerateMaze(); this.Player.Score = ScoreBoardCreator.CreatePlayerScore(); this.Player.Maze = this.Maze; this.TypeCommand(); } }
public void ScoreboardFactoryTest() { var score = ScoreBoardCreator.CreateScoreBoard(); Assert.IsTrue(score is IScoreBoard); }
public void PlayerScoreFactoryTest() { var score = ScoreBoardCreator.CreatePlayerScore(); Assert.IsTrue(score is IScore); }