~xenrox/10man-api

b94136393875ae6e37eacf43be253c45e57b50a3 — Thorben Günther 2 years ago 07076dc
config: Remove MatchSize

Allowing dynamic match sizes would require much more work on the
BalanceTeams algorithm.
2 files changed, 1 insertions(+), 4 deletions(-)

M config/config.go
M graph/schema.resolvers.go
M config/config.go => config/config.go +0 -3
@@ 3,8 3,5 @@ package config
// ConnectionString is used to connect to the database
const ConnectionString = "postgresql://user:pass@localhost/db?sslmode=disable"

// MatchSize number of players in a match
const MatchSize = 10

// Admins array of steamID64 of users that should become admins
var Admins = [1]string{"STEAMID64"}

M graph/schema.resolvers.go => graph/schema.resolvers.go +1 -1
@@ 94,7 94,7 @@ func (r *mutationResolver) StartQueue(ctx context.Context, id int) (int, error) 
		}
	}

	if players == config.MatchSize {
	if players == 10 {
		return players, errors.New("QueueFull")
	}