feat: impl release hand & next speaker selection
This commit is contained in:
@@ -5,25 +5,28 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"log"
|
||||
|
||||
"github.com/redis/go-redis/v9"
|
||||
)
|
||||
|
||||
type Person struct {
|
||||
PersonId int
|
||||
Name string
|
||||
PasswordHash string
|
||||
type PersonId int
|
||||
|
||||
// TODO move to rooms i guess
|
||||
func RandomPersonId() PersonId {
|
||||
randInt := rand.Int()
|
||||
if randInt == 0 {
|
||||
randInt = 1
|
||||
}
|
||||
return PersonId(randInt)
|
||||
}
|
||||
|
||||
type Room struct {
|
||||
Name string // will be unique ID
|
||||
AdminIds []int
|
||||
|
||||
type Person struct {
|
||||
Id PersonId
|
||||
Name string
|
||||
PasswordHash string
|
||||
Paricipants []Person
|
||||
// TODO hands, for each type of hand?
|
||||
// i guess participants order fixed for now?
|
||||
// and i'll still need 'current' for each hand level
|
||||
}
|
||||
|
||||
// well, it seems that i'd better do marshalling into bytes then
|
||||
|
||||
Reference in New Issue
Block a user