go.charczuk.com@v0.0.0-20240327042549-bc490516bd1a/experiments/matchmaker/pkg/sim/matchmaker.go (about) 1 /* 2 3 Copyright (c) 2024 - Present. Will Charczuk. All rights reserved. 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file at the root of the repository. 5 6 */ 7 8 package sim 9 10 import "math/rand" 11 12 type Matchmaker interface { 13 Init(r *rand.Rand) 14 Queue(...*Player) 15 QueueLen() int 16 FormGames(MatchmakerConfig) []MatchmakerGame 17 } 18 19 type MatchmakerGame struct { 20 TeamA []*Player 21 TeamB []*Player 22 } 23 24 type MatchmakerConfig struct { 25 MaxGames int 26 TeamSize int 27 }