hrm exporitng is hard

main
Bel LaPointe 2025-02-09 16:01:33 -07:00
parent c411a07bbf
commit 3815de0ed3
4 changed files with 17 additions and 9 deletions

View File

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

3
src/state/lobby/lobby.go Normal file
View File

@ -0,0 +1,3 @@
package lobby
type Lobby interface{}

View File

@ -5,12 +5,12 @@ import (
"io"
)
type Storage interface {
PlayerIDs(context.Context) ([]int, error)
type storage interface {
playerIDs(context.Context) ([]int, error)
}
type DB struct{}
func (db DB) PlayerIDs(ctx context.Context) ([]int, error) {
func (db DB) playerIDs(ctx context.Context) ([]int, error) {
return nil, io.EOF
}

5
src/state/state.go Normal file
View File

@ -0,0 +1,5 @@
package state
type State struct {
Lobby lobby.Lobby
}