public static void Main() { var constructor = new GameConstructor(); var gameBuilder = new SimpleConsoleGameBuilder(); var game = constructor.SetupGame(gameBuilder); game.GameRun(); }
public void TestCreateScoreBoardHanlerToReturnScoreboardHandler() { var simpleConsoleGameBuilder = new SimpleConsoleGameBuilder(); var scoreboard = simpleConsoleGameBuilder.CreateScoreboard(); var ScoreBoardHandler = simpleConsoleGameBuilder.CreteScoreBoardHanler(scoreboard); Assert.IsTrue(ScoreBoardHandler.GetType() == typeof(ScoreBoardHandler)); }
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); }
public void TestMethodCreateRendererToReturnConsoleRenderer() { var simpleConsoleGameBuilder = new SimpleConsoleGameBuilder(); var renderer = simpleConsoleGameBuilder.CreteRenderer(); Assert.IsTrue(renderer.GetType() == typeof(ConsoleRenderer)); }
public void TestCreateScoreboardToReturnScoreboard() { var simpleConsoleGameBuilder = new SimpleConsoleGameBuilder(); var scoreboard = simpleConsoleGameBuilder.CreateScoreboard(); Assert.IsTrue(scoreboard.GetType() == typeof(LocalScoreBoard)); }
public void TestCreateLabyrinthMatrixToReturnLabyrintMatrix() { var simpleConsoleGameBuilder = new SimpleConsoleGameBuilder(); var labyrinthMatrix = simpleConsoleGameBuilder.CreateLabyrinthMatrix(); Assert.IsTrue(labyrinthMatrix.GetType() == typeof(LabyrinthMatrix)); }