events.go 372 B

123456789101112131415161718192021
  1. package events
  2. import (
  3. "battlecamp-go/player"
  4. )
  5. type GameStart struct {
  6. Type string `json:"type"`
  7. GameId int64 `json:"gameId"`
  8. }
  9. type GameEnd struct {
  10. Type string `json:"type"`
  11. GameId int64 `json:"gameId"`
  12. Payload string `json:"payload"`
  13. }
  14. type PlayerUpdate struct {
  15. GameId int64 `json:"gameId"`
  16. Players []*player.Player `json:"players"`
  17. }