class RuleSetContent
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.GameLift.Alpha.RuleSetContent |
Go | github.com/aws/aws-cdk-go/awscdkgameliftalpha/v2#RuleSetContent |
Java | software.amazon.awscdk.services.gamelift.alpha.RuleSetContent |
Python | aws_cdk.aws_gamelift_alpha.RuleSetContent |
TypeScript (source) | @aws-cdk/aws-gamelift-alpha ยป RuleSetContent |
Implements
IRule
The rule set determines the two key elements of a match: your game's team structure and size, and how to group players together for the best possible match.
For example, a rule set might describe a match like this:
- Create a match with two teams of five players each, one team is the defenders and the other team the invaders.
- A team can have novice and experienced players, but the average skill of the two teams must be within 10 points of each other.
- If no match is made after 30 seconds, gradually relax the skill requirements.
Example
new gamelift.MatchmakingRuleSet(this, 'RuleSet', {
matchmakingRuleSetName: 'my-test-ruleset',
content: gamelift.RuleSetContent.fromJsonFile(path.join(__dirname, 'my-ruleset', 'ruleset.json')),
});
Initializer
new RuleSetContent(props: RuleSetContentProps)
Parameters
- props
Rule
Set Content Props
Properties
Name | Type | Description |
---|---|---|
content | IRule | RuleSet body content. |
content
Type:
IRule
RuleSet body content.
Methods
Name | Description |
---|---|
bind(_scope) | Called when the matchmaking ruleSet is initialized to allow this object to bind to the stack and add resources. |
static from | Inline body for Matchmaking ruleSet. |
static from | Matchmaking ruleSet body from a file. |
bind(_scope)
public bind(_scope: Construct): RuleSetBodyConfig
Parameters
- _scope
Construct
โ The binding scope.
Returns
Called when the matchmaking ruleSet is initialized to allow this object to bind to the stack and add resources.
Inline(body)
static frompublic static fromInline(body: string): IRuleSetContent
Parameters
- body
string
โ The actual ruleSet body (maximum 65535 characters).
Returns
Inline body for Matchmaking ruleSet.
JsonFile(path)
static frompublic static fromJsonFile(path: string): IRuleSetContent
Parameters
- path
string
โ The path to the ruleSet body file.
Returns
Matchmaking ruleSet body from a file.