Exemplo n.º 1
0
 /// <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();
 }
Exemplo n.º 2
0
 /// <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();
     }
 }
Exemplo n.º 3
0
        public void ScoreboardFactoryTest()
        {
            var score = ScoreBoardCreator.CreateScoreBoard();

            Assert.IsTrue(score is IScoreBoard);
        }
Exemplo n.º 4
0
        public void PlayerScoreFactoryTest()
        {
            var score = ScoreBoardCreator.CreatePlayerScore();

            Assert.IsTrue(score is IScore);
        }