hrm exporitng is hard
This commit is contained in:
@@ -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
3
src/state/lobby/lobby.go
Normal file
@@ -0,0 +1,3 @@
|
||||
package lobby
|
||||
|
||||
type Lobby interface{}
|
||||
@@ -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
5
src/state/state.go
Normal file
@@ -0,0 +1,5 @@
|
||||
package state
|
||||
|
||||
type State struct {
|
||||
Lobby lobby.Lobby
|
||||
}
|
||||
Reference in New Issue
Block a user