예제 #1
0
        public static Game MapGameDtoToGame(GameDto gameDto)
        {
            var newGame = new Game()
            {
                GameId         = gameDto.GameId,
                TurnChoice     = gameDto.TurnChoice,
                GameLevel      = gameDto.GameLevel,
                BoardDimension = gameDto.BoardDimension,
                IsGameOver     = gameDto.IsGameOver,
                IsGameWon      = gameDto.IsGameWon
            };

            return(newGame);
        }
예제 #2
0
        public static GameDto MapGameToGameDto(Game game)
        {
            var newGameDto = new GameDto()
            {
                GameId         = game.GameId,
                TurnChoice     = game.TurnChoice,
                GameLevel      = game.GameLevel,
                BoardDimension = game.BoardDimension,
                IsGameOver     = game.IsGameOver,
                IsGameWon      = game.IsGameWon
            };

            return(newGameDto);
        }