models

package
v0.0.0-...-d26b62e Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Class

type Class struct {
	//Min is the minimum buy in
	Min int `json:"min"`
	//Max is the maximum buy in
	Max int `json:"max"`
	//Blind is the small blind. Big Blind should be Blind*2
	Blind int `json:"blind"`
}

Class is the model for a lobby class specified by a blind and a minumum and maximum buyin

func NewClass

func NewClass(min, max, blind int) *Class

NewClass creates a new lobby class

type LobbyBase

type LobbyBase struct {
	LobbyID     string `json:"id"`
	Class       *Class `json:"class"`
	ClassIndex  int    `json:"classIndex"`
	PlayerCount int    `json:"playerCount"`
}

LobbyBase is the base model for a poker lobby. The Poker Matchmaker does not need any more information. But the poker gameserver extends this

func NewLobby

func NewLobby(lobbyId string, class *Class, classIndex int) *LobbyBase

NewLobby returns a new LobbyBase

func (*LobbyBase) String

func (l *LobbyBase) String() string

String formulates a custom string for logging

type Token

type Token struct {
	Username string
	Id       string
	BuyIn    int
	LobbyId  string
}

Token is the model for a ticket token

Jump to

Keyboard shortcuts

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