示例#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));
        }
示例#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));
        }
示例#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));
        }
示例#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));
        }
示例#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));
        }
示例#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));
        }
示例#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));
        }