Bel LaPointe 2025-02-09 15:56:42 -07:00
parent b7a78bedae
commit c411a07bbf
2 changed files with 33 additions and 0 deletions

17
src/state/lobby/event.go Normal file
View File

@ -0,0 +1,17 @@
package lobby
type Event interface {
LobbyEvent()
}
type PlayerJoin struct {
ID int
}
func (PlayerJoin) LobbyEvent() {}
type PlayerLeave struct {
ID int
}
func (PlayerLeave) LobbyEvent() {}

View File

@ -0,0 +1,16 @@
package lobby
import (
"context"
"io"
)
type Storage interface {
PlayerIDs(context.Context) ([]int, error)
}
type DB struct{}
func (db DB) PlayerIDs(ctx context.Context) ([]int, error) {
return nil, io.EOF
}