Example #1
0
        public void StartGame()
        {
            view.DisplayStartMenu();
            CreateStates();
            var gameState = gameController.GetGameState();

            view.DisplayField(mapper.Map(gameState.GameField));
            DisplayPlayerInfo();
            view.DisplayGameMenu();
        }
Example #2
0
        private void GetCargoInfo()
        {
            var cargo     = gameController.GetCurrentCellCargo();
            var gameState = gameController.GetGameState();

            view.DisplayField(mapper.Map(gameState.GameField));
            DisplayPlayerInfo();
            if (cargo == null)
            {
                view.DisplayNoCargoInfo();
            }
            else
            {
                view.DisplayCargoInfo(cargo.IsDecoding, cargo.Price, cargo.Weight);
            }
            view.DisplayGameMenu();
        }
Example #3
0
        public int[,] GetField()
        {
            var gameState = _controller.GetGameState();

            if (gameState is null)
            {
                return(new int[0, 0]);
            }
            var fieldModel = _fieldMapper.Map(_controller.GetGameState().GameField);

            return(fieldModel.Field);
        }