Ejemplo n.º 1
0
        public GameModel Play(int index, Guid gameId)
        {
            var gameModel = _repository.Read(gameId);
            var hasPlayed = gameModel.Play(index);

            _repository.Update(gameModel);
            return(gameModel);
        }
Ejemplo n.º 2
0
        public async Task <GameModel> Play(int index, Guid gameID)
        {
            var gameModel = await _gameModelRepository.Read(gameID);

            var hasPlayed = gameModel.Play(index);
            await _gameModelRepository.Update(gameModel);

            return(gameModel);
        }
Ejemplo n.º 3
0
        public async Task <GameModel> Play(int index, Guid gameId, int gameTimer)
        {
            var gameModel = await _repository.Read(gameId);

            var hasPlayed = gameModel.Play(index);

            gameModel.aTimer = gameTimer;
            await _repository.Update(gameModel);

            return(gameModel);
        }