hrm exporitng is hard
parent
c411a07bbf
commit
3815de0ed3
|
|
@ -1,17 +1,17 @@
|
||||||
package lobby
|
package lobby
|
||||||
|
|
||||||
type Event interface {
|
type event interface {
|
||||||
LobbyEvent()
|
lobbyEvent()
|
||||||
}
|
}
|
||||||
|
|
||||||
type PlayerJoin struct {
|
type playerJoin struct {
|
||||||
ID int
|
ID int
|
||||||
}
|
}
|
||||||
|
|
||||||
func (PlayerJoin) LobbyEvent() {}
|
func (playerJoin) LobbyEvent() {}
|
||||||
|
|
||||||
type PlayerLeave struct {
|
type playerLeave struct {
|
||||||
ID int
|
ID int
|
||||||
}
|
}
|
||||||
|
|
||||||
func (PlayerLeave) LobbyEvent() {}
|
func (playerLeave) LobbyEvent() {}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
package lobby
|
||||||
|
|
||||||
|
type Lobby interface{}
|
||||||
|
|
@ -5,12 +5,12 @@ import (
|
||||||
"io"
|
"io"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Storage interface {
|
type storage interface {
|
||||||
PlayerIDs(context.Context) ([]int, error)
|
playerIDs(context.Context) ([]int, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type DB struct{}
|
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
|
return nil, io.EOF
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
package state
|
||||||
|
|
||||||
|
type State struct {
|
||||||
|
Lobby lobby.Lobby
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue