public void InitializeTests() { this.Board = new Game.Data.Contract.Board(); this.RowController = new RowController(); this.Recognizer = new PatternRecognizer(this.Board, this.RowController); this.Analyzer = new BoardAnalyzer(this.Board); this.Controller = new BoardController(this.Board, this.Analyzer, this.Recognizer); this.Controller.Initialize(); this.Player = new Player("Nerzal") { Color = Colors.White }; this.Player2 = new Player("Wr4thon") { Color = Colors.Black }; IMovementRules movementRules = new MovementRules(this.Analyzer, this.Board); IGameOverRules gameOverRules = new GameOverRules(this.Analyzer); IRuleSet ruleSet = new RuleSet(movementRules, gameOverRules); IHistory history = new History(); this.MillRuleEvaluator = new Evaluator(ruleSet, this.Analyzer); IRowController rowController = new RowController(); IPatternRecognizer patternRecognizer = new PatternRecognizer(this.Board, rowController); this.GameController = new GameController(this.MillRuleEvaluator, this.Board, history, this.Controller, patternRecognizer, rowController); }
/// <summary> /// ctor /// </summary> /// <param name="ruleEvaluator"></param> /// <param name="board"></param> /// <param name="history"></param> /// <param name="boardController"></param> /// <param name="recognizer"></param> /// <param name="rowController"></param> public GameController(IMillRuleEvaluator ruleEvaluator, IBoard board, IHistory history, IBoardController boardController, IPatternRecognizer recognizer, IRowController rowController) { this._ruleEvaluator = ruleEvaluator; this._board = board; this._history = history; this._boardController = boardController; this._recognizer = recognizer; this._rowController = rowController; }
public void InitializeTests() { this.Board = new Game.Data.Contract.Board(); this.Analyzer = new BoardAnalyzer(this.Board); this.RowController = new RowController(); this.Recognizer = new PatternRecognizer(this.Board, this.RowController); this.Recognizer.Initialize(); this.Controller = new BoardController(this.Board, this.Analyzer, this.Recognizer); this.Controller.Initialize(); this.Player = new Player("Nerzal") { Color = Colors.White }; this.Player2 = new Player("Wr4th0n") { Color = Colors.Black }; }
/// <summary> /// ctor /// </summary> /// <param name="board"></param> /// <param name="analyzer"></param> /// <param name="recognizer"></param> public BoardController(IBoard board, IBoardAnalyzer analyzer, IPatternRecognizer recognizer) { this.Board = board; this._analyzer = analyzer; this._recognizer = recognizer; }