diff --git a/src/state/lobby/event.go b/src/state/lobby/event.go index ae094a4..b72c52a 100644 --- a/src/state/lobby/event.go +++ b/src/state/lobby/event.go @@ -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() {} diff --git a/src/state/lobby/lobby.go b/src/state/lobby/lobby.go new file mode 100644 index 0000000..96d51c4 --- /dev/null +++ b/src/state/lobby/lobby.go @@ -0,0 +1,3 @@ +package lobby + +type Lobby interface{} diff --git a/src/state/lobby/storage.go b/src/state/lobby/storage.go index 3e6634d..eb2ae4f 100644 --- a/src/state/lobby/storage.go +++ b/src/state/lobby/storage.go @@ -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 } diff --git a/src/state/state.go b/src/state/state.go new file mode 100644 index 0000000..5dcb938 --- /dev/null +++ b/src/state/state.go @@ -0,0 +1,5 @@ +package state + +type State struct { + Lobby lobby.Lobby +}