

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# 예제: 비슷한 특성을 가진 플레이어로 라지 매치 생성
<a name="match-examples-9"></a>

이 예제는 `batchDistance`를 사용하여 두 팀이 참가하는 매치에 대한 규칙 세트를 설정하는 방법을 보여줍니다. 예제에서는: 
+ `SimilarLeague` 규칙은 매치에 참가하는 모든 플레이어가 다른 플레이어 2명 이내에 `league`를 갖도록 보장합니다.
+ `SimilarSkill` 규칙은 매치에 참가하는 모든 플레이어가 다른 플레이어 10명 이내에 `skill`을 갖도록 보장합니다. 플레이어가 10초 동안 기다린 경우 거리는 20으로 확장됩니다. 플레이어가 20초 동안 기다린 경우 거리는 40으로 확장됩니다.
+ `SameMap` 규칙은 매치에 참가한 모든 플레이어가 동일한 `map`를 요청하도록 보장합니다.
+ `SameMode` 규칙은 매치에 참가한 모든 플레이어가 동일한 `mode`를 요청하도록 보장합니다.

```
{
    "ruleLanguageVersion": "1.0",
    "teams": [{
        "name": "red",
        "minPlayers": 100,
        "maxPlayers": 100
    }, {
        "name": "blue",
        "minPlayers": 100,
        "maxPlayers": 100
    }],
    "algorithm": {
        "strategy":"balanced",
        "balancedAttribute": "skill",
        "batchingPreference":"fastestRegion"
    },
    "playerAttributes": [{
        "name": "league",
        "type": "number"
    },{
        "name": "skill",
        "type": "number"
    },{
        "name": "map",
        "type": "string"
    },{
        "name": "mode",
        "type": "string"
    }],
    "rules": [{
        "name": "SimilarLeague",
        "type": "batchDistance",
        "batchAttribute": "league",
        "maxDistance": 2
    }, {
        "name": "SimilarSkill",
        "type": "batchDistance",
        "batchAttribute": "skill",
        "maxDistance": 10
    }, {
        "name": "SameMap",
        "type": "batchDistance",
        "batchAttribute": "map"
    }, {
        "name": "SameMode",
        "type": "batchDistance",
        "batchAttribute": "mode"
    }],
    "expansions": [{
        "target": "rules[SimilarSkill].maxDistance",
        "steps": [{
            "waitTimeSeconds": 10,
            "value": 20
        }, {
            "waitTimeSeconds": 20,
            "value": 40
        }]
    }]
}
```