コード例 #1
0
ファイル: AppStart.cs プロジェクト: Vasil-Pavlov/Labyrinth-4
 public static void Main()
 {
     var constructor = new GameConstructor();
     var gameBuilder = new SimpleConsoleGameBuilder();
     var game = constructor.SetupGame(gameBuilder);
     game.GameRun();
 }
コード例 #2
0
 public void TestCreateScoreBoardHanlerToReturnScoreboardHandler()
 {
     var simpleConsoleGameBuilder = new SimpleConsoleGameBuilder();
     var scoreboard = simpleConsoleGameBuilder.CreateScoreboard();
     var ScoreBoardHandler = simpleConsoleGameBuilder.CreteScoreBoardHanler(scoreboard);
     Assert.IsTrue(ScoreBoardHandler.GetType() == typeof(ScoreBoardHandler));
 }
コード例 #3
0
 public Game SetupGame(SimpleConsoleGameBuilder objectBuilder)
 {
     this.renderer = objectBuilder.CreteRenderer();
     this.player = objectBuilder.CreatePlayer();
     this.scoreBoardHandler = objectBuilder.CreteScoreBoardHanler();
     this.procesor = new LabyrinthProcesor(this.renderer, this.player, this.scoreBoardHandler);
     return Game.Instance(this.player, this.renderer, this.scoreBoardHandler, this.procesor);
 }
コード例 #4
0
 public void TestMethodCreateRendererToReturnConsoleRenderer()
 {
     var simpleConsoleGameBuilder = new SimpleConsoleGameBuilder();
     var renderer = simpleConsoleGameBuilder.CreteRenderer();
     Assert.IsTrue(renderer.GetType() == typeof(ConsoleRenderer));
 }
コード例 #5
0
 public void TestCreateScoreboardToReturnScoreboard()
 {
     var simpleConsoleGameBuilder = new SimpleConsoleGameBuilder();
     var scoreboard = simpleConsoleGameBuilder.CreateScoreboard();
     Assert.IsTrue(scoreboard.GetType() == typeof(LocalScoreBoard));
 }
コード例 #6
0
 public void TestCreateLabyrinthMatrixToReturnLabyrintMatrix()
 {
     var simpleConsoleGameBuilder = new SimpleConsoleGameBuilder();
     var labyrinthMatrix = simpleConsoleGameBuilder.CreateLabyrinthMatrix();
     Assert.IsTrue(labyrinthMatrix.GetType() == typeof(LabyrinthMatrix));
 }