Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public void Initialize()
        {
            MovementRules moveValidationRules = new MovementRules(this.Analyzer, this.Board);
            GameOverRules gameOverRules       = new GameOverRules(this.Analyzer);
            RuleSet       ruleSet             = new RuleSet(moveValidationRules, gameOverRules);

            this._evaluator = new Evaluator(ruleSet, this.Analyzer);
        }