package
Version:
v0.26.0
Opens a new window with list of versions in this module.
Published: Oct 12, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package arena ships the stateful arena actions for the Flow Arena example.
type CountRes struct {
Players int `json:"players"`
}
type InputReq struct {
ID string `json:"id" validate:"required"`
DX int `json:"dx"`
DY int `json:"dy"`
}
type InputRes struct {
OK bool `json:"ok"`
}
type Player struct {
ID string `json:"id"`
X int `json:"x"`
Y int `json:"y"`
}
type SpawnReq struct {
ID string `json:"id" validate:"required"`
}
type SpawnRes struct {
OK bool `json:"ok"`
X int `json:"x"`
Y int `json:"y"`
}
type TickRes struct {
Tick uint64 `json:"tick"`
}
type View struct {
Tick uint64 `json:"tick"`
Self Player `json:"self"`
Nearby []Player `json:"nearby"`
}
type ViewReq struct {
ID string `json:"id" validate:"required"`
Radius int `json:"radius"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.