We are going to finish our poker game soon, but before going need to fill some gap that we fill as blank in start.
As i told you above we are making poker game of 5 players
Question # 1
Query we are set on matchmaker ticket
minCount = 2 maxCount = 6
when player 1 call AddMatchmakerAsync() with related Query then user add on the matchmaker pool
When player 2 comes he also have same query and flow , both comes out from matchmaker pool , on server side
RegisterMatchmakerMatched hook called
Problem is when player 3 comes he also follow same query and flow but he don’t comes out from matchmaker pool because minCount = 2
and always minCount >1
he waits for 4th player with same query
how to solve this ?
Question # 2
we get list of matches with Query
limit := 10
isAuthoritative := true
label := “skill=100-150”
min_size := 0
max_size := 4
if matches, err := nk.MatchList(ctx, limit, isAuthoritative, label, min_size, max_size, “”); err != nil {
// Handle error.
} else {
for _, match := range matches {
logger.Info(“Match id %s”, match.GetMatchId())
}
}
on match list we dont give the name of match we want to get ?
but when we create a match
modulename := "pingpong" // Name with which match handler was registered in InitModule, see example above.
if matchId, err := nk.MatchCreate(ctx, modulename, params); err != nil {
return "", err
} else {
return matchId, nil
}
iparams on matchcreate is Equivalent with match list params except ctx ?
While get list of matches we don’t have to pass gamename .
and while create a match we dont pass room boundaries.
here i clear in future we have multiple types of poker Game
“NOTE: WE are also implementing Bots”