Esempio n. 1
0
        public ITurtleExtended InitTurtle(IMineFieldExtended mineField)
        {
            var turtle = _turtleRepository.GetTurtle();

            _validator.ValidateTurtle(turtle, mineField);
            var moves = _turtleRepository.GetMoves();

            return(new TurtleExtended(turtle, moves));
        }
        public async Task <GameSettingsDto> Handle(GetGameSettingsQuery request, CancellationToken cancellationToken)
        {
            var gameBoard = await gameBoardRepository.GetGameBoard();

            var turtle = await turtleRepository.GetTurtle();

            Domain.Model.GameSettings gameSettings = new Domain.Model.GameSettings
            {
                GameBoard = gameBoard,
                Turtle    = turtle
            };
            return(mapper.Map <GameSettingsDto>(gameSettings));
        }