functions

package
v0.0.0-...-63c973b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MATCFUNC_NAME = "player_capacity_matchfunc"
)

Variables

View Source
var (
	ErrMatchProfileIsNil = errors.New("MatchProfile can't be nil")
	ErrPoolTicketsIsNil  = errors.New("PoolTickets can't be nil")
)
View Source
var (
	ErrPlayersCapacityInvalid = errors.New("player capacity must be higher than zero")
)

Functions

func CreateMatchForTickets

func CreateMatchForTickets(matchID, profileName string, extensions map[string]*any.Any, tickets ...*pb.Ticket) *pb.Match

func ValidateMatchFunArguments

func ValidateMatchFunArguments(playerCapacity int, profile *pb.MatchProfile, poolTickets map[string][]*pb.Ticket) error

Types

type MakeMatchesFunc

type MakeMatchesFunc func(profile *pb.MatchProfile, poolTickets map[string][]*pb.Ticket) ([]*pb.Match, error)

func MatchByGamePlayersCapacity

func MatchByGamePlayersCapacity(playerCapacity int) MakeMatchesFunc

Criteria for Matches - Number or tickets should not exceed the PlayerCapacity set by the Status.Players.Capacity field from the GS

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL