wip
parent
b7a78bedae
commit
c411a07bbf
|
|
@ -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() {}
|
||||
|
|
@ -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
|
||||
}
|
||||
Loading…
Reference in New Issue