use distinct types for player and session ids

This commit is contained in:
2024-01-31 22:40:12 -06:00
parent d61c70da86
commit 73b5ac7960
8 changed files with 42 additions and 32 deletions

View File

@@ -5,6 +5,8 @@ import (
"sync/atomic"
"testing"
"github.com/google/uuid"
"git.sunturtle.xyz/studio/shotgun/lobby"
"git.sunturtle.xyz/studio/shotgun/player"
)
@@ -20,7 +22,7 @@ func TestQueue(t *testing.T) {
for i := 0; i < N; i++ {
i := i
go func() {
id, _, deal := l.Queue(context.Background(), player.ID{uint8(i), uint8(i >> 8)})
id, _, deal := l.Queue(context.Background(), player.ID{UUID: uuid.UUID{uint8(i), uint8(i >> 8)}})
if deal {
dealers.Add(1)
} else {