Esempio n. 1
0
        /// <summary>
        /// Gets the gameby game identifier.
        /// </summary>
        /// <param name="gameId">The game identifier.</param>
        /// <returns>
        /// The game
        /// </returns>
        public Result <Game> GetGamebyGameId(Guid gameId)
        {
            var context = AdapterFactory.GetAdapter(this.isRestCall);

            return(context.GetGamebyGameId(gameId));
        }
Esempio n. 2
0
        /// <summary>
        /// Registers the team.
        /// </summary>
        /// <param name="teamName">Name of the team.</param>
        /// <returns>
        /// The team
        /// </returns>
        public Result <Team> RegisterTeam(string teamName)
        {
            var context = AdapterFactory.GetAdapter(this.isRestCall);

            return(context.RegisterTeam(teamName));
        }
Esempio n. 3
0
        /// <summary>
        /// Plays the hand.
        /// </summary>
        /// <param name="gameId">The game identifier.</param>
        /// <param name="teamId">The team identifier.</param>
        /// <param name="hand">The hand.</param>
        /// <returns>
        /// The outcome
        /// </returns>
        public Result <OperationOutcome> PlayHand(Guid gameId, Guid teamId, Hand hand)
        {
            var context = AdapterFactory.GetAdapter(this.isRestCall);

            return(context.PlayHand(gameId, teamId, hand));
        }
Esempio n. 4
0
        /// <summary>
        /// Determines whether [is it my turn] [the specified game identifier].
        /// </summary>
        /// <param name="gameId">The game identifier.</param>
        /// <param name="teamId">The team identifier.</param>
        /// <returns>
        /// A bool indicating if its the teams turn.
        /// </returns>
        public Result <bool> IsItMyTurn(Guid gameId, Guid teamId)
        {
            var context = AdapterFactory.GetAdapter(this.isRestCall);

            return(context.IsItMyTurn(gameId, teamId));
        }
Esempio n. 5
0
        /// <summary>
        /// Gets the next available game.
        /// </summary>
        /// <param name="teamId">The team identifier.</param>
        /// <param name="useSimulator">The use simulator.</param>
        /// <returns>
        /// Game identifier
        /// </returns>
        public Result <Guid> GetNextAvailableGame(Guid teamId, bool?useSimulator)
        {
            var context = AdapterFactory.GetAdapter(this.isRestCall);

            return(context.GetNextAvailableGame(teamId, useSimulator));
        }
Esempio n. 6
0
        /// <summary>
        /// Gets the completed round by game identifier.
        /// </summary>
        /// <param name="gameId">The game identifier.</param>
        /// <returns>
        /// The rounds
        /// </returns>
        public IEnumerable <Round> GetCompletedRoundByGameId(Guid gameId)
        {
            var context = AdapterFactory.GetAdapter(this.isRestCall);

            return(context.GetCompletedRoundByGameId(gameId));
        }
Esempio n. 7
0
        /// <summary>
        /// Gets the name of the team by team.
        /// </summary>
        /// <param name="teamName">Name of the team.</param>
        /// <returns>
        /// The team
        /// </returns>
        public Result <Team> GetTeamByTeamName(string teamName)
        {
            var context = AdapterFactory.GetAdapter(this.isRestCall);

            return(context.GetTeamByTeamName(teamName));
        }