public MiniMaxAlgorithm(Int32 depth, IGameFactory gameFactory) { if (depth < 1) { throw new ArgumentOutOfRangeException("depth"); } if (null == gameFactory) { throw new ArgumentNullException("gameFactory"); } _depth = depth; _gameFactory = gameFactory; _gameLogic = gameFactory.CreateLogic(); _moveEvaluator = gameFactory.CreateMoveEvaluator(); _stateEvaluator = gameFactory.CreateStateEvaluator(); }