public void Setup()
        {
            _logger = new Logger();

            var user = new User();

            var boardPrinter = new ConsoleBoardPrinter();
            var scoreManager = new ScoreManager();

            _actionParser   = new ActionParser();
            _boardManager   = new BoardManager();
            _boardGenerator = new BoardGenerator();

            // Delete all the scores at the start of each test.
            scoreManager.DeleteAll();

            //Setups the game
            _gameManager = new GameManager(boardPrinter, _boardManager, _boardGenerator, _actionParser, scoreManager, user);

            _boardOptions = new BoardOptions(new Vector2(5, 5), 5);

            _board = _boardGenerator.GenerateBoard(_boardOptions);

            // Generate all positions file
            FileGenerator.GenerateAllPositions(_board);
        }
예제 #2
0
        private static void Main()
        {
            using (var container = GetContainer())
            {
                var printer        = new ConsoleBoardPrinter();
                var consoleHandler = new ConsoleHandler(printer);
                var game           = container.Resolve <Func <IUiHandler, IGame> >()(consoleHandler);

                game.Start();
            }
        }
        public void SetUp()
        {
            var boardPrinter   = new ConsoleBoardPrinter();
            var boardManager   = new BoardManager();
            var boardGenerator = new BoardGenerator();
            var actionParser   = new ActionParser();
            var user           = new User();
            var scoreManager   = new ScoreManager();

            // Delete all the scores at the start of each test.
            scoreManager.DeleteAll();
            _gameManager = new GameManager(boardPrinter, boardManager, boardGenerator, actionParser, scoreManager, user);
        }
예제 #4
0
        private static void Main(string[] args)
        {
            var user           = new User();
            var boardPrinter   = new ConsoleBoardPrinter();
            var boardManager   = new BoardManager();
            var boardGenerator = new BoardGenerator();
            var actionParser   = new ActionParser();
            var scoreManager   = new ScoreManager();
            var gameManager    = new GameManager(boardPrinter, boardManager, boardGenerator, actionParser, scoreManager, user);
            var boardOptions   = new BoardOptions(new Vector2(5, 5), 5);

            gameManager.Start(boardOptions);
        }
예제 #5
0
 public void SetUp()
 {
     _printer = new ConsoleBoardPrinter();
 }