Documentation
¶
Index ¶
- Variables
- func RegisterBroadcastServer(s *grpc.Server, srv BroadcastServer)
- func RegisterGameServer(s *grpc.Server, srv GameServer)
- func RegisterHealthServer(s *grpc.Server, srv HealthServer)
- func RegisterRemoteServer(s *grpc.Server, srv RemoteServer)
- type Ball
- type BallProperties
- func (*BallProperties) Descriptor() ([]byte, []int)deprecated
- func (x *BallProperties) GetHolder() *Player
- func (x *BallProperties) GetPosition() *Point
- func (x *BallProperties) GetVelocity() *Velocity
- func (*BallProperties) ProtoMessage()
- func (x *BallProperties) ProtoReflect() protoreflect.Message
- func (x *BallProperties) Reset()
- func (x *BallProperties) String() string
- type BroadcastClient
- type BroadcastServer
- type Broadcast_OnEventClient
- type Broadcast_OnEventServer
- type Catch
- type CommandResponse
- func (*CommandResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CommandResponse) GetCode() CommandResponse_StatusCode
- func (x *CommandResponse) GetDetails() string
- func (x *CommandResponse) GetGameSnapshot() *GameSnapshot
- func (*CommandResponse) ProtoMessage()
- func (x *CommandResponse) ProtoReflect() protoreflect.Message
- func (x *CommandResponse) Reset()
- func (x *CommandResponse) String() string
- type CommandResponse_StatusCode
- func (CommandResponse_StatusCode) Descriptor() protoreflect.EnumDescriptor
- func (x CommandResponse_StatusCode) Enum() *CommandResponse_StatusCode
- func (CommandResponse_StatusCode) EnumDescriptor() ([]byte, []int)deprecated
- func (x CommandResponse_StatusCode) Number() protoreflect.EnumNumber
- func (x CommandResponse_StatusCode) String() string
- func (CommandResponse_StatusCode) Type() protoreflect.EnumType
- type EventDebugBreakpoint
- func (*EventDebugBreakpoint) Descriptor() ([]byte, []int)deprecated
- func (x *EventDebugBreakpoint) GetBreakpoint() EventDebugBreakpoint_Breakpoint
- func (*EventDebugBreakpoint) ProtoMessage()
- func (x *EventDebugBreakpoint) ProtoReflect() protoreflect.Message
- func (x *EventDebugBreakpoint) Reset()
- func (x *EventDebugBreakpoint) String() string
- type EventDebugBreakpoint_Breakpoint
- func (EventDebugBreakpoint_Breakpoint) Descriptor() protoreflect.EnumDescriptor
- func (x EventDebugBreakpoint_Breakpoint) Enum() *EventDebugBreakpoint_Breakpoint
- func (EventDebugBreakpoint_Breakpoint) EnumDescriptor() ([]byte, []int)deprecated
- func (x EventDebugBreakpoint_Breakpoint) Number() protoreflect.EnumNumber
- func (x EventDebugBreakpoint_Breakpoint) String() string
- func (EventDebugBreakpoint_Breakpoint) Type() protoreflect.EnumType
- type EventDebugReleased
- type EventGameOver
- type EventGoal
- type EventLostPlayer
- type EventNewPlayer
- type EventStateChange
- func (*EventStateChange) Descriptor() ([]byte, []int)deprecated
- func (x *EventStateChange) GetNewState() GameSnapshot_State
- func (x *EventStateChange) GetPreviousState() GameSnapshot_State
- func (*EventStateChange) ProtoMessage()
- func (x *EventStateChange) ProtoReflect() protoreflect.Message
- func (x *EventStateChange) Reset()
- func (x *EventStateChange) String() string
- type GameClient
- type GameEvent
- func (*GameEvent) Descriptor() ([]byte, []int)deprecated
- func (x *GameEvent) GetBreakpoint() *EventDebugBreakpoint
- func (x *GameEvent) GetDebugReleased() *EventDebugReleased
- func (m *GameEvent) GetEvent() isGameEvent_Event
- func (x *GameEvent) GetGameOver() *EventGameOver
- func (x *GameEvent) GetGameSnapshot() *GameSnapshot
- func (x *GameEvent) GetGoal() *EventGoal
- func (x *GameEvent) GetLostPlayer() *EventLostPlayer
- func (x *GameEvent) GetNewPlayer() *EventNewPlayer
- func (x *GameEvent) GetStateChange() *EventStateChange
- func (*GameEvent) ProtoMessage()
- func (x *GameEvent) ProtoReflect() protoreflect.Message
- func (x *GameEvent) Reset()
- func (x *GameEvent) String() string
- type GameEvent_Breakpoint
- type GameEvent_DebugReleased
- type GameEvent_GameOver
- type GameEvent_Goal
- type GameEvent_LostPlayer
- type GameEvent_NewPlayer
- type GameEvent_StateChange
- type GameProperties
- func (*GameProperties) Descriptor() ([]byte, []int)deprecated
- func (x *GameProperties) GetAwayScore() uint32
- func (x *GameProperties) GetFrameInterval() int64
- func (x *GameProperties) GetHomeScore() uint32
- func (x *GameProperties) GetShotClock() *ShotClock
- func (x *GameProperties) GetTurn() uint32
- func (*GameProperties) ProtoMessage()
- func (x *GameProperties) ProtoReflect() protoreflect.Message
- func (x *GameProperties) Reset()
- func (x *GameProperties) String() string
- type GameServer
- type GameSetup
- func (*GameSetup) Descriptor() ([]byte, []int)deprecated
- func (x *GameSetup) GetAwayTeam() *TeamSettings
- func (x *GameSetup) GetDevMode() bool
- func (x *GameSetup) GetGameDuration() uint32
- func (x *GameSetup) GetHomeTeam() *TeamSettings
- func (x *GameSetup) GetListeningDuration() uint32
- func (x *GameSetup) GetListeningMode() GameSetup_ListeningMode
- func (x *GameSetup) GetProtocolVersion() string
- func (x *GameSetup) GetStartMode() GameSetup_StartingMode
- func (*GameSetup) ProtoMessage()
- func (x *GameSetup) ProtoReflect() protoreflect.Message
- func (x *GameSetup) Reset()
- func (x *GameSetup) String() string
- type GameSetup_ListeningMode
- func (GameSetup_ListeningMode) Descriptor() protoreflect.EnumDescriptor
- func (x GameSetup_ListeningMode) Enum() *GameSetup_ListeningMode
- func (GameSetup_ListeningMode) EnumDescriptor() ([]byte, []int)deprecated
- func (x GameSetup_ListeningMode) Number() protoreflect.EnumNumber
- func (x GameSetup_ListeningMode) String() string
- func (GameSetup_ListeningMode) Type() protoreflect.EnumType
- type GameSetup_StartingMode
- func (GameSetup_StartingMode) Descriptor() protoreflect.EnumDescriptor
- func (x GameSetup_StartingMode) Enum() *GameSetup_StartingMode
- func (GameSetup_StartingMode) EnumDescriptor() ([]byte, []int)deprecated
- func (x GameSetup_StartingMode) Number() protoreflect.EnumNumber
- func (x GameSetup_StartingMode) String() string
- func (GameSetup_StartingMode) Type() protoreflect.EnumType
- type GameSnapshot
- func (*GameSnapshot) Descriptor() ([]byte, []int)deprecated
- func (x *GameSnapshot) GetAwayTeam() *Team
- func (x *GameSnapshot) GetBall() *Ball
- func (x *GameSnapshot) GetHomeTeam() *Team
- func (x *GameSnapshot) GetShotClock() *ShotClock
- func (x *GameSnapshot) GetState() GameSnapshot_State
- func (x *GameSnapshot) GetTurn() uint32
- func (x *GameSnapshot) GetTurnsBallInGoalZone() uint32
- func (*GameSnapshot) ProtoMessage()
- func (x *GameSnapshot) ProtoReflect() protoreflect.Message
- func (x *GameSnapshot) Reset()
- func (x *GameSnapshot) String() string
- type GameSnapshot_State
- func (GameSnapshot_State) Descriptor() protoreflect.EnumDescriptor
- func (x GameSnapshot_State) Enum() *GameSnapshot_State
- func (GameSnapshot_State) EnumDescriptor() ([]byte, []int)deprecated
- func (x GameSnapshot_State) Number() protoreflect.EnumNumber
- func (x GameSnapshot_State) String() string
- func (GameSnapshot_State) Type() protoreflect.EnumType
- type Game_JoinATeamClient
- type Game_JoinATeamServer
- type HealthCheckRequest
- func (*HealthCheckRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HealthCheckRequest) GetService() string
- func (*HealthCheckRequest) ProtoMessage()
- func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message
- func (x *HealthCheckRequest) Reset()
- func (x *HealthCheckRequest) String() string
- type HealthCheckResponse
- func (*HealthCheckResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus
- func (*HealthCheckResponse) ProtoMessage()
- func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message
- func (x *HealthCheckResponse) Reset()
- func (x *HealthCheckResponse) String() string
- type HealthCheckResponse_ServingStatus
- func (HealthCheckResponse_ServingStatus) Descriptor() protoreflect.EnumDescriptor
- func (x HealthCheckResponse_ServingStatus) Enum() *HealthCheckResponse_ServingStatus
- func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x HealthCheckResponse_ServingStatus) Number() protoreflect.EnumNumber
- func (x HealthCheckResponse_ServingStatus) String() string
- func (HealthCheckResponse_ServingStatus) Type() protoreflect.EnumType
- type HealthClient
- type HealthServer
- type Health_WatchClient
- type Health_WatchServer
- type JoinRequest
- func (*JoinRequest) Descriptor() ([]byte, []int)deprecated
- func (x *JoinRequest) GetInitPosition() *Point
- func (x *JoinRequest) GetNumber() uint32
- func (x *JoinRequest) GetProtocolVersion() string
- func (x *JoinRequest) GetTeamSide() Team_Side
- func (x *JoinRequest) GetToken() string
- func (*JoinRequest) ProtoMessage()
- func (x *JoinRequest) ProtoReflect() protoreflect.Message
- func (x *JoinRequest) Reset()
- func (x *JoinRequest) String() string
- type Jump
- type Kick
- type Move
- type NextOrderRequest
- type NextTurnRequest
- type Order
- func (*Order) Descriptor() ([]byte, []int)deprecated
- func (m *Order) GetAction() isOrder_Action
- func (x *Order) GetCatch() *Catch
- func (x *Order) GetJump() *Jump
- func (x *Order) GetKick() *Kick
- func (x *Order) GetMove() *Move
- func (*Order) ProtoMessage()
- func (x *Order) ProtoReflect() protoreflect.Message
- func (x *Order) Reset()
- func (x *Order) String() string
- type OrderResponse
- func (*OrderResponse) Descriptor() ([]byte, []int)deprecated
- func (x *OrderResponse) GetCode() OrderResponse_StatusCode
- func (x *OrderResponse) GetDetails() string
- func (*OrderResponse) ProtoMessage()
- func (x *OrderResponse) ProtoReflect() protoreflect.Message
- func (x *OrderResponse) Reset()
- func (x *OrderResponse) String() string
- type OrderResponse_StatusCode
- func (OrderResponse_StatusCode) Descriptor() protoreflect.EnumDescriptor
- func (x OrderResponse_StatusCode) Enum() *OrderResponse_StatusCode
- func (OrderResponse_StatusCode) EnumDescriptor() ([]byte, []int)deprecated
- func (x OrderResponse_StatusCode) Number() protoreflect.EnumNumber
- func (x OrderResponse_StatusCode) String() string
- func (OrderResponse_StatusCode) Type() protoreflect.EnumType
- type OrderSet
- func (*OrderSet) Descriptor() ([]byte, []int)deprecated
- func (x *OrderSet) GetDebugMessage() string
- func (x *OrderSet) GetOrders() []*Order
- func (x *OrderSet) GetTurn() uint32
- func (*OrderSet) ProtoMessage()
- func (x *OrderSet) ProtoReflect() protoreflect.Message
- func (x *OrderSet) Reset()
- func (x *OrderSet) String() string
- type Order_Catch
- type Order_Jump
- type Order_Kick
- type Order_Move
- type PauseResumeRequest
- type Player
- func (*Player) Descriptor() ([]byte, []int)deprecated
- func (x *Player) GetInitPosition() *Point
- func (x *Player) GetNumber() uint32
- func (x *Player) GetPosition() *Point
- func (x *Player) GetTeamSide() Team_Side
- func (x *Player) GetVelocity() *Velocity
- func (*Player) ProtoMessage()
- func (x *Player) ProtoReflect() protoreflect.Message
- func (x *Player) Reset()
- func (x *Player) String() string
- type PlayerOrder
- type PlayerProperties
- func (*PlayerProperties) Descriptor() ([]byte, []int)deprecated
- func (x *PlayerProperties) GetNumber() uint32
- func (x *PlayerProperties) GetPosition() *Point
- func (x *PlayerProperties) GetSide() Team_Side
- func (x *PlayerProperties) GetVelocity() *Velocity
- func (*PlayerProperties) ProtoMessage()
- func (x *PlayerProperties) ProtoReflect() protoreflect.Message
- func (x *PlayerProperties) Reset()
- func (x *PlayerProperties) String() string
- type Point
- func (m Point) Copy() *Point
- func (*Point) Descriptor() ([]byte, []int)deprecated
- func (m Point) DistanceTo(target Point) (distance float64)
- func (x *Point) GetX() int32
- func (x *Point) GetY() int32
- func (m Point) MiddlePointTo(target Point) Point
- func (*Point) ProtoMessage()
- func (x *Point) ProtoReflect() protoreflect.Message
- func (x *Point) Reset()
- func (x *Point) String() string
- type RemoteClient
- type RemoteServer
- type ResumeListeningRequest
- type ResumeListeningResponse
- type ShotClock
- func (*ShotClock) Descriptor() ([]byte, []int)deprecated
- func (x *ShotClock) GetRemainingTurns() uint32
- func (x *ShotClock) GetTeamSide() Team_Side
- func (*ShotClock) ProtoMessage()
- func (x *ShotClock) ProtoReflect() protoreflect.Message
- func (x *ShotClock) Reset()
- func (x *ShotClock) String() string
- type StartRequest
- type Team
- func (*Team) Descriptor() ([]byte, []int)deprecated
- func (x *Team) GetName() string
- func (x *Team) GetPlayers() []*Player
- func (x *Team) GetScore() uint32
- func (x *Team) GetSide() Team_Side
- func (*Team) ProtoMessage()
- func (x *Team) ProtoReflect() protoreflect.Message
- func (x *Team) Reset()
- func (x *Team) String() string
- type TeamColor
- func (*TeamColor) Descriptor() ([]byte, []int)deprecated
- func (x *TeamColor) GetBlue() uint32
- func (x *TeamColor) GetGreen() uint32
- func (x *TeamColor) GetRed() uint32
- func (*TeamColor) ProtoMessage()
- func (x *TeamColor) ProtoReflect() protoreflect.Message
- func (x *TeamColor) Reset()
- func (x *TeamColor) String() string
- type TeamColors
- func (*TeamColors) Descriptor() ([]byte, []int)deprecated
- func (x *TeamColors) GetPrimary() *TeamColor
- func (x *TeamColors) GetSecondary() *TeamColor
- func (*TeamColors) ProtoMessage()
- func (x *TeamColors) ProtoReflect() protoreflect.Message
- func (x *TeamColors) Reset()
- func (x *TeamColors) String() string
- type TeamSettings
- func (*TeamSettings) Descriptor() ([]byte, []int)deprecated
- func (x *TeamSettings) GetAvatar() string
- func (x *TeamSettings) GetColors() *TeamColors
- func (x *TeamSettings) GetName() string
- func (*TeamSettings) ProtoMessage()
- func (x *TeamSettings) ProtoReflect() protoreflect.Message
- func (x *TeamSettings) Reset()
- func (x *TeamSettings) String() string
- type Team_Side
- type UnimplementedBroadcastServer
- type UnimplementedGameServer
- type UnimplementedHealthServer
- type UnimplementedRemoteServer
- func (*UnimplementedRemoteServer) NextOrder(context.Context, *NextOrderRequest) (*CommandResponse, error)
- func (*UnimplementedRemoteServer) NextTurn(context.Context, *NextTurnRequest) (*CommandResponse, error)
- func (*UnimplementedRemoteServer) PauseOrResume(context.Context, *PauseResumeRequest) (*CommandResponse, error)
- func (*UnimplementedRemoteServer) ResumeListeningPhase(context.Context, *ResumeListeningRequest) (*ResumeListeningResponse, error)
- func (*UnimplementedRemoteServer) SetBallProperties(context.Context, *BallProperties) (*CommandResponse, error)
- func (*UnimplementedRemoteServer) SetGameProperties(context.Context, *GameProperties) (*CommandResponse, error)
- func (*UnimplementedRemoteServer) SetPlayerProperties(context.Context, *PlayerProperties) (*CommandResponse, error)
- type Vector
- func (v *Vector) Add(vector *Vector) (*Vector, error)
- func (v *Vector) AddAngleDegree(degree float64) *Vector
- func (v *Vector) Angle() float64
- func (v *Vector) AngleDegrees() float64
- func (v *Vector) AngleWith(b *Vector) float64
- func (v Vector) Copy() *Vector
- func (v *Vector) Cos() float64
- func (*Vector) Descriptor() ([]byte, []int)deprecated
- func (x *Vector) GetX() float64
- func (x *Vector) GetY() float64
- func (v *Vector) Invert() *Vector
- func (v *Vector) IsEqualTo(b *Vector) bool
- func (v *Vector) IsObstacle(from Point, obstacle Point) bool
- func (v *Vector) Length() float64
- func (v *Vector) MarshalJSON() ([]byte, error)
- func (v *Vector) Normalize() *Vector
- func (v *Vector) OppositeAngle() float64
- func (v Vector) Perpendicular() *Vector
- func (*Vector) ProtoMessage()
- func (x *Vector) ProtoReflect() protoreflect.Message
- func (x *Vector) Reset()
- func (v *Vector) Scale(t float64) (*Vector, error)
- func (v *Vector) SetLength(length float64) (*Vector, error)
- func (v *Vector) SetX(x float64) (*Vector, error)
- func (v *Vector) SetY(y float64) (*Vector, error)
- func (v *Vector) Sin() float64
- func (x *Vector) String() string
- func (v *Vector) Sub(vector *Vector) (*Vector, error)
- func (v *Vector) TargetFrom(point Point) Point
- func (v *Vector) UnmarshalJSON(b []byte) error
- type Velocity
- func (m *Velocity) Add(velocity Velocity)
- func (m Velocity) Copy() *Velocity
- func (*Velocity) Descriptor() ([]byte, []int)deprecated
- func (x *Velocity) GetDirection() *Vector
- func (m *Velocity) GetNextPoint(from Point) Point
- func (x *Velocity) GetSpeed() float64
- func (*Velocity) ProtoMessage()
- func (x *Velocity) ProtoReflect() protoreflect.Message
- func (x *Velocity) Reset()
- func (x *Velocity) String() string
- type WatcherRequest
Constants ¶
This section is empty.
Variables ¶
var ( GameSetup_StartingMode_name = map[int32]string{ 0: "NO_WAIT", 1: "WAIT", } GameSetup_StartingMode_value = map[string]int32{ "NO_WAIT": 0, "WAIT": 1, } )
Enum value maps for GameSetup_StartingMode.
var ( GameSetup_ListeningMode_name = map[int32]string{ 0: "TIMER", 1: "RUSH", 2: "REMOTE", } GameSetup_ListeningMode_value = map[string]int32{ "TIMER": 0, "RUSH": 1, "REMOTE": 2, } )
Enum value maps for GameSetup_ListeningMode.
var ( EventDebugBreakpoint_Breakpoint_name = map[int32]string{ 0: "ORDERS", 1: "TURN", } EventDebugBreakpoint_Breakpoint_value = map[string]int32{ "ORDERS": 0, "TURN": 1, } )
Enum value maps for EventDebugBreakpoint_Breakpoint.
var ( HealthCheckResponse_ServingStatus_name = map[int32]string{ 0: "UNKNOWN", 1: "SERVING", 2: "NOT_SERVING", 3: "SERVICE_UNKNOWN", } HealthCheckResponse_ServingStatus_value = map[string]int32{ "UNKNOWN": 0, "SERVING": 1, "NOT_SERVING": 2, "SERVICE_UNKNOWN": 3, } )
Enum value maps for HealthCheckResponse_ServingStatus.
var ( CommandResponse_StatusCode_name = map[int32]string{ 0: "SUCCESS", 1: "INVALID_VALUE", 2: "DEADLINE_EXCEEDED", 99: "OTHER", } CommandResponse_StatusCode_value = map[string]int32{ "SUCCESS": 0, "INVALID_VALUE": 1, "DEADLINE_EXCEEDED": 2, "OTHER": 99, } )
Enum value maps for CommandResponse_StatusCode.
var ( GameSnapshot_State_name = map[int32]string{ 0: "WAITING", 1: "GET_READY", 2: "LISTENING", 3: "PLAYING", 4: "SHIFTING", 99: "OVER", } GameSnapshot_State_value = map[string]int32{ "WAITING": 0, "GET_READY": 1, "LISTENING": 2, "PLAYING": 3, "SHIFTING": 4, "OVER": 99, } )
Enum value maps for GameSnapshot_State.
var ( Team_Side_name = map[int32]string{ 0: "HOME", 1: "AWAY", } Team_Side_value = map[string]int32{ "HOME": 0, "AWAY": 1, } )
Enum value maps for Team_Side.
var ( OrderResponse_StatusCode_name = map[int32]string{ 0: "SUCCESS", 1: "UNKNOWN_PLAYER", 2: "NOT_LISTENING", 3: "WRONG_TURN", 99: "OTHER", } OrderResponse_StatusCode_value = map[string]int32{ "SUCCESS": 0, "UNKNOWN_PLAYER": 1, "NOT_LISTENING": 2, "WRONG_TURN": 3, "OTHER": 99, } )
Enum value maps for OrderResponse_StatusCode.
var File_broadcast_proto protoreflect.FileDescriptor
var File_health_proto protoreflect.FileDescriptor
var File_physics_proto protoreflect.FileDescriptor
var File_remote_proto protoreflect.FileDescriptor
var File_server_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBroadcastServer ¶
func RegisterBroadcastServer(s *grpc.Server, srv BroadcastServer)
func RegisterGameServer ¶
func RegisterGameServer(s *grpc.Server, srv GameServer)
func RegisterHealthServer ¶
func RegisterHealthServer(s *grpc.Server, srv HealthServer)
func RegisterRemoteServer ¶
func RegisterRemoteServer(s *grpc.Server, srv RemoteServer)
Types ¶
type Ball ¶
type Ball struct { // Current position Position *Point `protobuf:"bytes,1,opt,name=position,proto3" json:"position,omitempty"` // Current velocity. It will be the exactly same velocity as the ball holder when a player is holding it. Velocity *Velocity `protobuf:"bytes,2,opt,name=velocity,proto3" json:"velocity,omitempty"` // Player that is currently holding the ball. Null if the ball is not holden. Holder *Player `protobuf:"bytes,3,opt,name=holder,proto3" json:"holder,omitempty"` // contains filtered or unexported fields }
Stores all ball attributes
func (*Ball) Descriptor
deprecated
func (*Ball) GetPosition ¶
func (*Ball) GetVelocity ¶
func (*Ball) ProtoMessage ¶
func (*Ball) ProtoMessage()
func (*Ball) ProtoReflect ¶
func (x *Ball) ProtoReflect() protoreflect.Message
type BallProperties ¶
type BallProperties struct { Position *Point `protobuf:"bytes,1,opt,name=position,proto3" json:"position,omitempty"` Velocity *Velocity `protobuf:"bytes,2,opt,name=velocity,proto3" json:"velocity,omitempty"` Holder *Player `protobuf:"bytes,3,opt,name=holder,proto3" json:"holder,omitempty"` // contains filtered or unexported fields }
func (*BallProperties) Descriptor
deprecated
func (*BallProperties) Descriptor() ([]byte, []int)
Deprecated: Use BallProperties.ProtoReflect.Descriptor instead.
func (*BallProperties) GetHolder ¶
func (x *BallProperties) GetHolder() *Player
func (*BallProperties) GetPosition ¶
func (x *BallProperties) GetPosition() *Point
func (*BallProperties) GetVelocity ¶
func (x *BallProperties) GetVelocity() *Velocity
func (*BallProperties) ProtoMessage ¶
func (*BallProperties) ProtoMessage()
func (*BallProperties) ProtoReflect ¶
func (x *BallProperties) ProtoReflect() protoreflect.Message
func (*BallProperties) Reset ¶
func (x *BallProperties) Reset()
func (*BallProperties) String ¶
func (x *BallProperties) String() string
type BroadcastClient ¶
type BroadcastClient interface { // Keep an open stream that publish all important events in the match. OnEvent(ctx context.Context, in *WatcherRequest, opts ...grpc.CallOption) (Broadcast_OnEventClient, error) // Returns the game setup configuration. GetGameSetup(ctx context.Context, in *WatcherRequest, opts ...grpc.CallOption) (*GameSetup, error) // StartGame allows the master watcher to start the match. // See the Game Server starting mode to understand how it works. StartGame(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*GameSetup, error) }
BroadcastClient is the client API for Broadcast service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewBroadcastClient ¶
func NewBroadcastClient(cc grpc.ClientConnInterface) BroadcastClient
type BroadcastServer ¶
type BroadcastServer interface { // Keep an open stream that publish all important events in the match. OnEvent(*WatcherRequest, Broadcast_OnEventServer) error // Returns the game setup configuration. GetGameSetup(context.Context, *WatcherRequest) (*GameSetup, error) // StartGame allows the master watcher to start the match. // See the Game Server starting mode to understand how it works. StartGame(context.Context, *StartRequest) (*GameSetup, error) }
BroadcastServer is the server API for Broadcast service.
type Broadcast_OnEventClient ¶
type Broadcast_OnEventClient interface { Recv() (*GameEvent, error) grpc.ClientStream }
type Broadcast_OnEventServer ¶
type Broadcast_OnEventServer interface { Send(*GameEvent) error grpc.ServerStream }
type Catch ¶
type Catch struct {
// contains filtered or unexported fields
}
Order to try to catch the ball. The player can only catch the ball when the player is touching the ball. Only one catching order can be executed in a turn. So, if more than one player try to catch the ball in the same turn, the first processed catch order will succeed, and the next ones will fail.
func (*Catch) Descriptor
deprecated
func (*Catch) ProtoMessage ¶
func (*Catch) ProtoMessage()
func (*Catch) ProtoReflect ¶
func (x *Catch) ProtoReflect() protoreflect.Message
type CommandResponse ¶
type CommandResponse struct { Code CommandResponse_StatusCode `protobuf:"varint,1,opt,name=code,proto3,enum=lugo.CommandResponse_StatusCode" json:"code,omitempty"` GameSnapshot *GameSnapshot `protobuf:"bytes,2,opt,name=game_snapshot,json=gameSnapshot,proto3" json:"game_snapshot,omitempty"` Details string `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"` // contains filtered or unexported fields }
func (*CommandResponse) Descriptor
deprecated
func (*CommandResponse) Descriptor() ([]byte, []int)
Deprecated: Use CommandResponse.ProtoReflect.Descriptor instead.
func (*CommandResponse) GetCode ¶
func (x *CommandResponse) GetCode() CommandResponse_StatusCode
func (*CommandResponse) GetDetails ¶
func (x *CommandResponse) GetDetails() string
func (*CommandResponse) GetGameSnapshot ¶
func (x *CommandResponse) GetGameSnapshot() *GameSnapshot
func (*CommandResponse) ProtoMessage ¶
func (*CommandResponse) ProtoMessage()
func (*CommandResponse) ProtoReflect ¶
func (x *CommandResponse) ProtoReflect() protoreflect.Message
func (*CommandResponse) Reset ¶
func (x *CommandResponse) Reset()
func (*CommandResponse) String ¶
func (x *CommandResponse) String() string
type CommandResponse_StatusCode ¶
type CommandResponse_StatusCode int32
const ( CommandResponse_SUCCESS CommandResponse_StatusCode = 0 CommandResponse_INVALID_VALUE CommandResponse_StatusCode = 1 CommandResponse_DEADLINE_EXCEEDED CommandResponse_StatusCode = 2 CommandResponse_OTHER CommandResponse_StatusCode = 99 )
func (CommandResponse_StatusCode) Descriptor ¶
func (CommandResponse_StatusCode) Descriptor() protoreflect.EnumDescriptor
func (CommandResponse_StatusCode) Enum ¶
func (x CommandResponse_StatusCode) Enum() *CommandResponse_StatusCode
func (CommandResponse_StatusCode) EnumDescriptor
deprecated
func (CommandResponse_StatusCode) EnumDescriptor() ([]byte, []int)
Deprecated: Use CommandResponse_StatusCode.Descriptor instead.
func (CommandResponse_StatusCode) Number ¶
func (x CommandResponse_StatusCode) Number() protoreflect.EnumNumber
func (CommandResponse_StatusCode) String ¶
func (x CommandResponse_StatusCode) String() string
func (CommandResponse_StatusCode) Type ¶
func (CommandResponse_StatusCode) Type() protoreflect.EnumType
type EventDebugBreakpoint ¶
type EventDebugBreakpoint struct { // Type of the breakpoint reached. Breakpoint EventDebugBreakpoint_Breakpoint `protobuf:"varint,1,opt,name=breakpoint,proto3,enum=lugo.EventDebugBreakpoint_Breakpoint" json:"breakpoint,omitempty"` // contains filtered or unexported fields }
(only available dev mode) Represents the event of having a breakpoint reached.
func (*EventDebugBreakpoint) Descriptor
deprecated
func (*EventDebugBreakpoint) Descriptor() ([]byte, []int)
Deprecated: Use EventDebugBreakpoint.ProtoReflect.Descriptor instead.
func (*EventDebugBreakpoint) GetBreakpoint ¶
func (x *EventDebugBreakpoint) GetBreakpoint() EventDebugBreakpoint_Breakpoint
func (*EventDebugBreakpoint) ProtoMessage ¶
func (*EventDebugBreakpoint) ProtoMessage()
func (*EventDebugBreakpoint) ProtoReflect ¶
func (x *EventDebugBreakpoint) ProtoReflect() protoreflect.Message
func (*EventDebugBreakpoint) Reset ¶
func (x *EventDebugBreakpoint) Reset()
func (*EventDebugBreakpoint) String ¶
func (x *EventDebugBreakpoint) String() string
type EventDebugBreakpoint_Breakpoint ¶
type EventDebugBreakpoint_Breakpoint int32
const ( // Breakpoint that breaks the game before each player orders set be processed during the "Playing" state // Each player's order set will be processed at once, so the breakpoint controls the process based on // players, not on orders. EventDebugBreakpoint_ORDERS EventDebugBreakpoint_Breakpoint = 0 // Breakpoint that breaks the game before each player turn be processed during the "Playing" state EventDebugBreakpoint_TURN EventDebugBreakpoint_Breakpoint = 1 )
func (EventDebugBreakpoint_Breakpoint) Descriptor ¶
func (EventDebugBreakpoint_Breakpoint) Descriptor() protoreflect.EnumDescriptor
func (EventDebugBreakpoint_Breakpoint) Enum ¶
func (x EventDebugBreakpoint_Breakpoint) Enum() *EventDebugBreakpoint_Breakpoint
func (EventDebugBreakpoint_Breakpoint) EnumDescriptor
deprecated
func (EventDebugBreakpoint_Breakpoint) EnumDescriptor() ([]byte, []int)
Deprecated: Use EventDebugBreakpoint_Breakpoint.Descriptor instead.
func (EventDebugBreakpoint_Breakpoint) Number ¶
func (x EventDebugBreakpoint_Breakpoint) Number() protoreflect.EnumNumber
func (EventDebugBreakpoint_Breakpoint) String ¶
func (x EventDebugBreakpoint_Breakpoint) String() string
func (EventDebugBreakpoint_Breakpoint) Type ¶
func (EventDebugBreakpoint_Breakpoint) Type() protoreflect.EnumType
type EventDebugReleased ¶
type EventDebugReleased struct {
// contains filtered or unexported fields
}
(only available dev mode) Represents the event of having a breakpoint released.
func (*EventDebugReleased) Descriptor
deprecated
func (*EventDebugReleased) Descriptor() ([]byte, []int)
Deprecated: Use EventDebugReleased.ProtoReflect.Descriptor instead.
func (*EventDebugReleased) ProtoMessage ¶
func (*EventDebugReleased) ProtoMessage()
func (*EventDebugReleased) ProtoReflect ¶
func (x *EventDebugReleased) ProtoReflect() protoreflect.Message
func (*EventDebugReleased) Reset ¶
func (x *EventDebugReleased) Reset()
func (*EventDebugReleased) String ¶
func (x *EventDebugReleased) String() string
type EventGameOver ¶
type EventGameOver struct {
// contains filtered or unexported fields
}
Represents the event of having the game ended.
func (*EventGameOver) Descriptor
deprecated
func (*EventGameOver) Descriptor() ([]byte, []int)
Deprecated: Use EventGameOver.ProtoReflect.Descriptor instead.
func (*EventGameOver) ProtoMessage ¶
func (*EventGameOver) ProtoMessage()
func (*EventGameOver) ProtoReflect ¶
func (x *EventGameOver) ProtoReflect() protoreflect.Message
func (*EventGameOver) Reset ¶
func (x *EventGameOver) Reset()
func (*EventGameOver) String ¶
func (x *EventGameOver) String() string
type EventGoal ¶
type EventGoal struct { // Side of the team that changed the score. Side Team_Side `protobuf:"varint,1,opt,name=side,proto3,enum=lugo.Team_Side" json:"side,omitempty"` // @todo implementing the player who scored. // contains filtered or unexported fields }
Represents the event of having a goal during the match
func (*EventGoal) Descriptor
deprecated
func (*EventGoal) ProtoMessage ¶
func (*EventGoal) ProtoMessage()
func (*EventGoal) ProtoReflect ¶
func (x *EventGoal) ProtoReflect() protoreflect.Message
type EventLostPlayer ¶
type EventLostPlayer struct { // Player that has disconnected from the game. Player *Player `protobuf:"bytes,1,opt,name=player,proto3" json:"player,omitempty"` // contains filtered or unexported fields }
Represents the event of having a player disconnected from the game.
func (*EventLostPlayer) Descriptor
deprecated
func (*EventLostPlayer) Descriptor() ([]byte, []int)
Deprecated: Use EventLostPlayer.ProtoReflect.Descriptor instead.
func (*EventLostPlayer) GetPlayer ¶
func (x *EventLostPlayer) GetPlayer() *Player
func (*EventLostPlayer) ProtoMessage ¶
func (*EventLostPlayer) ProtoMessage()
func (*EventLostPlayer) ProtoReflect ¶
func (x *EventLostPlayer) ProtoReflect() protoreflect.Message
func (*EventLostPlayer) Reset ¶
func (x *EventLostPlayer) Reset()
func (*EventLostPlayer) String ¶
func (x *EventLostPlayer) String() string
type EventNewPlayer ¶
type EventNewPlayer struct { // Player that has connected to the game. Player *Player `protobuf:"bytes,1,opt,name=player,proto3" json:"player,omitempty"` // contains filtered or unexported fields }
Represents the event of having a new player connected to the game.
func (*EventNewPlayer) Descriptor
deprecated
func (*EventNewPlayer) Descriptor() ([]byte, []int)
Deprecated: Use EventNewPlayer.ProtoReflect.Descriptor instead.
func (*EventNewPlayer) GetPlayer ¶
func (x *EventNewPlayer) GetPlayer() *Player
func (*EventNewPlayer) ProtoMessage ¶
func (*EventNewPlayer) ProtoMessage()
func (*EventNewPlayer) ProtoReflect ¶
func (x *EventNewPlayer) ProtoReflect() protoreflect.Message
func (*EventNewPlayer) Reset ¶
func (x *EventNewPlayer) Reset()
func (*EventNewPlayer) String ¶
func (x *EventNewPlayer) String() string
type EventStateChange ¶
type EventStateChange struct { // State of the game before the event. PreviousState GameSnapshot_State `` /* 130-byte string literal not displayed */ // State of the game after the event. NewState GameSnapshot_State `protobuf:"varint,2,opt,name=new_state,json=newState,proto3,enum=lugo.GameSnapshot_State" json:"new_state,omitempty"` // contains filtered or unexported fields }
Represents the event of having the game state changed (e.g. from Waiting to GetReady).
func (*EventStateChange) Descriptor
deprecated
func (*EventStateChange) Descriptor() ([]byte, []int)
Deprecated: Use EventStateChange.ProtoReflect.Descriptor instead.
func (*EventStateChange) GetNewState ¶
func (x *EventStateChange) GetNewState() GameSnapshot_State
func (*EventStateChange) GetPreviousState ¶
func (x *EventStateChange) GetPreviousState() GameSnapshot_State
func (*EventStateChange) ProtoMessage ¶
func (*EventStateChange) ProtoMessage()
func (*EventStateChange) ProtoReflect ¶
func (x *EventStateChange) ProtoReflect() protoreflect.Message
func (*EventStateChange) Reset ¶
func (x *EventStateChange) Reset()
func (*EventStateChange) String ¶
func (x *EventStateChange) String() string
type GameClient ¶
type GameClient interface { // JoinATeam allows the player to listen the server during the match. JoinATeam(ctx context.Context, in *JoinRequest, opts ...grpc.CallOption) (Game_JoinATeamClient, error) // SendOrders allows the player to send others to the server when the game is on listening state. SendOrders(ctx context.Context, in *OrderSet, opts ...grpc.CallOption) (*OrderResponse, error) }
GameClient is the client API for Game service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewGameClient ¶
func NewGameClient(cc grpc.ClientConnInterface) GameClient
type GameEvent ¶
type GameEvent struct { // Game snapshot after the event has happened. GameSnapshot *GameSnapshot `protobuf:"bytes,1,opt,name=game_snapshot,json=gameSnapshot,proto3" json:"game_snapshot,omitempty"` // Types that are assignable to Event: // *GameEvent_NewPlayer // *GameEvent_LostPlayer // *GameEvent_StateChange // *GameEvent_Goal // *GameEvent_GameOver // *GameEvent_Breakpoint // *GameEvent_DebugReleased Event isGameEvent_Event `protobuf_oneof:"event"` // contains filtered or unexported fields }
Brings the game snapshot and the event in a specialised format.
func (*GameEvent) Descriptor
deprecated
func (*GameEvent) GetBreakpoint ¶
func (x *GameEvent) GetBreakpoint() *EventDebugBreakpoint
func (*GameEvent) GetDebugReleased ¶
func (x *GameEvent) GetDebugReleased() *EventDebugReleased
func (*GameEvent) GetGameOver ¶
func (x *GameEvent) GetGameOver() *EventGameOver
func (*GameEvent) GetGameSnapshot ¶
func (x *GameEvent) GetGameSnapshot() *GameSnapshot
func (*GameEvent) GetLostPlayer ¶
func (x *GameEvent) GetLostPlayer() *EventLostPlayer
func (*GameEvent) GetNewPlayer ¶
func (x *GameEvent) GetNewPlayer() *EventNewPlayer
func (*GameEvent) GetStateChange ¶
func (x *GameEvent) GetStateChange() *EventStateChange
func (*GameEvent) ProtoMessage ¶
func (*GameEvent) ProtoMessage()
func (*GameEvent) ProtoReflect ¶
func (x *GameEvent) ProtoReflect() protoreflect.Message
type GameEvent_Breakpoint ¶
type GameEvent_Breakpoint struct {
Breakpoint *EventDebugBreakpoint `protobuf:"bytes,7,opt,name=breakpoint,proto3,oneof"`
}
type GameEvent_DebugReleased ¶
type GameEvent_DebugReleased struct {
DebugReleased *EventDebugReleased `protobuf:"bytes,8,opt,name=debug_released,json=debugReleased,proto3,oneof"`
}
type GameEvent_GameOver ¶
type GameEvent_GameOver struct {
GameOver *EventGameOver `protobuf:"bytes,6,opt,name=game_over,json=gameOver,proto3,oneof"`
}
type GameEvent_Goal ¶
type GameEvent_Goal struct {
Goal *EventGoal `protobuf:"bytes,5,opt,name=goal,proto3,oneof"`
}
type GameEvent_LostPlayer ¶
type GameEvent_LostPlayer struct {
LostPlayer *EventLostPlayer `protobuf:"bytes,3,opt,name=lost_player,json=lostPlayer,proto3,oneof"`
}
type GameEvent_NewPlayer ¶
type GameEvent_NewPlayer struct {
NewPlayer *EventNewPlayer `protobuf:"bytes,2,opt,name=new_player,json=newPlayer,proto3,oneof"`
}
type GameEvent_StateChange ¶
type GameEvent_StateChange struct {
StateChange *EventStateChange `protobuf:"bytes,4,opt,name=state_change,json=stateChange,proto3,oneof"`
}
type GameProperties ¶
type GameProperties struct { Turn uint32 `protobuf:"varint,1,opt,name=turn,proto3" json:"turn,omitempty"` HomeScore uint32 `protobuf:"varint,2,opt,name=home_score,json=homeScore,proto3" json:"home_score,omitempty"` AwayScore uint32 `protobuf:"varint,3,opt,name=away_score,json=awayScore,proto3" json:"away_score,omitempty"` FrameInterval int64 `protobuf:"varint,4,opt,name=frame_interval,json=frameInterval,proto3" json:"frame_interval,omitempty"` ShotClock *ShotClock `protobuf:"bytes,5,opt,name=shot_clock,json=shotClock,proto3" json:"shot_clock,omitempty"` // contains filtered or unexported fields }
func (*GameProperties) Descriptor
deprecated
func (*GameProperties) Descriptor() ([]byte, []int)
Deprecated: Use GameProperties.ProtoReflect.Descriptor instead.
func (*GameProperties) GetAwayScore ¶
func (x *GameProperties) GetAwayScore() uint32
func (*GameProperties) GetFrameInterval ¶
func (x *GameProperties) GetFrameInterval() int64
func (*GameProperties) GetHomeScore ¶
func (x *GameProperties) GetHomeScore() uint32
func (*GameProperties) GetShotClock ¶
func (x *GameProperties) GetShotClock() *ShotClock
func (*GameProperties) GetTurn ¶
func (x *GameProperties) GetTurn() uint32
func (*GameProperties) ProtoMessage ¶
func (*GameProperties) ProtoMessage()
func (*GameProperties) ProtoReflect ¶
func (x *GameProperties) ProtoReflect() protoreflect.Message
func (*GameProperties) Reset ¶
func (x *GameProperties) Reset()
func (*GameProperties) String ¶
func (x *GameProperties) String() string
type GameServer ¶
type GameServer interface { // JoinATeam allows the player to listen the server during the match. JoinATeam(*JoinRequest, Game_JoinATeamServer) error // SendOrders allows the player to send others to the server when the game is on listening state. SendOrders(context.Context, *OrderSet) (*OrderResponse, error) }
GameServer is the server API for Game service.
type GameSetup ¶
type GameSetup struct { // Defines the communication protocol version between the players and the game server. // The players also inform to the server what protocol they will use. If incompatible, the server will reject the player. ProtocolVersion string `protobuf:"bytes,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"` DevMode bool `protobuf:"varint,2,opt,name=dev_mode,json=devMode,proto3" json:"dev_mode,omitempty"` StartMode GameSetup_StartingMode `protobuf:"varint,3,opt,name=start_mode,json=startMode,proto3,enum=lugo.GameSetup_StartingMode" json:"start_mode,omitempty"` ListeningMode GameSetup_ListeningMode `` /* 135-byte string literal not displayed */ // in milliseconds ListeningDuration uint32 `protobuf:"varint,5,opt,name=listening_duration,json=listeningDuration,proto3" json:"listening_duration,omitempty"` GameDuration uint32 `protobuf:"varint,6,opt,name=game_duration,json=gameDuration,proto3" json:"game_duration,omitempty"` HomeTeam *TeamSettings `protobuf:"bytes,8,opt,name=home_team,json=homeTeam,proto3" json:"home_team,omitempty"` AwayTeam *TeamSettings `protobuf:"bytes,9,opt,name=away_team,json=awayTeam,proto3" json:"away_team,omitempty"` // contains filtered or unexported fields }
func (*GameSetup) Descriptor
deprecated
func (*GameSetup) GetAwayTeam ¶
func (x *GameSetup) GetAwayTeam() *TeamSettings
func (*GameSetup) GetDevMode ¶
func (*GameSetup) GetGameDuration ¶
func (*GameSetup) GetHomeTeam ¶
func (x *GameSetup) GetHomeTeam() *TeamSettings
func (*GameSetup) GetListeningDuration ¶
func (*GameSetup) GetListeningMode ¶
func (x *GameSetup) GetListeningMode() GameSetup_ListeningMode
func (*GameSetup) GetProtocolVersion ¶
func (*GameSetup) GetStartMode ¶
func (x *GameSetup) GetStartMode() GameSetup_StartingMode
func (*GameSetup) ProtoMessage ¶
func (*GameSetup) ProtoMessage()
func (*GameSetup) ProtoReflect ¶
func (x *GameSetup) ProtoReflect() protoreflect.Message
type GameSetup_ListeningMode ¶
type GameSetup_ListeningMode int32
const ( // respect the timer defined by listening duration GameSetup_TIMER GameSetup_ListeningMode = 0 // immediately after all orders GameSetup_RUSH GameSetup_ListeningMode = 1 // wait external remote control (dev only) GameSetup_REMOTE GameSetup_ListeningMode = 2 )
func (GameSetup_ListeningMode) Descriptor ¶
func (GameSetup_ListeningMode) Descriptor() protoreflect.EnumDescriptor
func (GameSetup_ListeningMode) Enum ¶
func (x GameSetup_ListeningMode) Enum() *GameSetup_ListeningMode
func (GameSetup_ListeningMode) EnumDescriptor
deprecated
func (GameSetup_ListeningMode) EnumDescriptor() ([]byte, []int)
Deprecated: Use GameSetup_ListeningMode.Descriptor instead.
func (GameSetup_ListeningMode) Number ¶
func (x GameSetup_ListeningMode) Number() protoreflect.EnumNumber
func (GameSetup_ListeningMode) String ¶
func (x GameSetup_ListeningMode) String() string
func (GameSetup_ListeningMode) Type ¶
func (GameSetup_ListeningMode) Type() protoreflect.EnumType
type GameSetup_StartingMode ¶
type GameSetup_StartingMode int32
const ( // start the game as soon as all players are connected GameSetup_NO_WAIT GameSetup_StartingMode = 0 // do not start until the master watcher request (gRPC call to Broadcast service) GameSetup_WAIT GameSetup_StartingMode = 1 )
func (GameSetup_StartingMode) Descriptor ¶
func (GameSetup_StartingMode) Descriptor() protoreflect.EnumDescriptor
func (GameSetup_StartingMode) Enum ¶
func (x GameSetup_StartingMode) Enum() *GameSetup_StartingMode
func (GameSetup_StartingMode) EnumDescriptor
deprecated
func (GameSetup_StartingMode) EnumDescriptor() ([]byte, []int)
Deprecated: Use GameSetup_StartingMode.Descriptor instead.
func (GameSetup_StartingMode) Number ¶
func (x GameSetup_StartingMode) Number() protoreflect.EnumNumber
func (GameSetup_StartingMode) String ¶
func (x GameSetup_StartingMode) String() string
func (GameSetup_StartingMode) Type ¶
func (GameSetup_StartingMode) Type() protoreflect.EnumType
type GameSnapshot ¶
type GameSnapshot struct { // The game state defines which phase the game is. The phase determine what the server is doing, are going to do, or // what it is waiting for. State GameSnapshot_State `protobuf:"varint,1,opt,name=state,proto3,enum=lugo.GameSnapshot_State" json:"state,omitempty"` // Turns counter. It starts from 1, but before the match starts, it may be zero. Turn uint32 `protobuf:"varint,2,opt,name=turn,proto3" json:"turn,omitempty"` // Store the home team elements. HomeTeam *Team `protobuf:"bytes,3,opt,name=home_team,json=homeTeam,proto3" json:"home_team,omitempty"` // Store the away team elements. AwayTeam *Team `protobuf:"bytes,4,opt,name=away_team,json=awayTeam,proto3" json:"away_team,omitempty"` // Store the ball element. Ball *Ball `protobuf:"bytes,5,opt,name=ball,proto3" json:"ball,omitempty"` // number of turns the ball is in a goal zone TurnsBallInGoalZone uint32 `protobuf:"varint,6,opt,name=turns_ball_in_goal_zone,json=turnsBallInGoalZone,proto3" json:"turns_ball_in_goal_zone,omitempty"` // Store the shot clock to control ball possession limit ShotClock *ShotClock `protobuf:"bytes,7,opt,name=shot_clock,json=shotClock,proto3" json:"shot_clock,omitempty"` // contains filtered or unexported fields }
GameSnapshot stores all game elements data.
func (*GameSnapshot) Descriptor
deprecated
func (*GameSnapshot) Descriptor() ([]byte, []int)
Deprecated: Use GameSnapshot.ProtoReflect.Descriptor instead.
func (*GameSnapshot) GetAwayTeam ¶
func (x *GameSnapshot) GetAwayTeam() *Team
func (*GameSnapshot) GetBall ¶
func (x *GameSnapshot) GetBall() *Ball
func (*GameSnapshot) GetHomeTeam ¶
func (x *GameSnapshot) GetHomeTeam() *Team
func (*GameSnapshot) GetShotClock ¶
func (x *GameSnapshot) GetShotClock() *ShotClock
func (*GameSnapshot) GetState ¶
func (x *GameSnapshot) GetState() GameSnapshot_State
func (*GameSnapshot) GetTurn ¶
func (x *GameSnapshot) GetTurn() uint32
func (*GameSnapshot) GetTurnsBallInGoalZone ¶
func (x *GameSnapshot) GetTurnsBallInGoalZone() uint32
func (*GameSnapshot) ProtoMessage ¶
func (*GameSnapshot) ProtoMessage()
func (*GameSnapshot) ProtoReflect ¶
func (x *GameSnapshot) ProtoReflect() protoreflect.Message
func (*GameSnapshot) Reset ¶
func (x *GameSnapshot) Reset()
func (*GameSnapshot) String ¶
func (x *GameSnapshot) String() string
type GameSnapshot_State ¶
type GameSnapshot_State int32
const ( // The game is waiting for all players be connected. There is a configurable time limit to wait for players. After // this limit expires, the match is considered over. GameSnapshot_WAITING GameSnapshot_State = 0 // The game resets the players position to start the match or to restart the match after a goal. GameSnapshot_GET_READY GameSnapshot_State = 1 // The game is waiting for players orders. There is a configurable time window for this phase. After the time // limit expires, the server will ignore the missing orders and process the ones it got. // (when running on dev mode, the server may allow different behaviours) GameSnapshot_LISTENING GameSnapshot_State = 2 // The game is executing the players' orders in the same sequence they were gotten. // If the ball is NOT been holden, its velocity will be processed first. Otherwise, it position will be updated // when the ball holder movement be processed. // If there is no movement orders from a player, but it has speed greater than 0, it will be processed after // all its orders are processed. // Each player orders will be processed in the same sequence they were included in the message (e.g. first move, // than kick) // The ball kick is processed immediately after the order (the ball position is updated as its new velocity // after the kick) GameSnapshot_PLAYING GameSnapshot_State = 3 // The game interrupt the match to shift the ball possession. It happens only when the shot time is over (see // shot_clock property). The ball will be given to the goalkeeper of the defense team, and the next state will // "listening", so the bots will not have time to rearrange before the next turn. GameSnapshot_SHIFTING GameSnapshot_State = 4 // The game may be over after any phase. // It can be over after Waiting if there is no players connected after the time limit for connections // It can be over after GetReady or Listening if there is no enough players (e.g. connection lost) // And it also can be over after Playing state if that was the last turn of the match. GameSnapshot_OVER GameSnapshot_State = 99 )
func (GameSnapshot_State) Descriptor ¶
func (GameSnapshot_State) Descriptor() protoreflect.EnumDescriptor
func (GameSnapshot_State) Enum ¶
func (x GameSnapshot_State) Enum() *GameSnapshot_State
func (GameSnapshot_State) EnumDescriptor
deprecated
func (GameSnapshot_State) EnumDescriptor() ([]byte, []int)
Deprecated: Use GameSnapshot_State.Descriptor instead.
func (GameSnapshot_State) Number ¶
func (x GameSnapshot_State) Number() protoreflect.EnumNumber
func (GameSnapshot_State) String ¶
func (x GameSnapshot_State) String() string
func (GameSnapshot_State) Type ¶
func (GameSnapshot_State) Type() protoreflect.EnumType
type Game_JoinATeamClient ¶
type Game_JoinATeamClient interface { Recv() (*GameSnapshot, error) grpc.ClientStream }
type Game_JoinATeamServer ¶
type Game_JoinATeamServer interface { Send(*GameSnapshot) error grpc.ServerStream }
type HealthCheckRequest ¶
type HealthCheckRequest struct { Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` // contains filtered or unexported fields }
func (*HealthCheckRequest) Descriptor
deprecated
func (*HealthCheckRequest) Descriptor() ([]byte, []int)
Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead.
func (*HealthCheckRequest) GetService ¶
func (x *HealthCheckRequest) GetService() string
func (*HealthCheckRequest) ProtoMessage ¶
func (*HealthCheckRequest) ProtoMessage()
func (*HealthCheckRequest) ProtoReflect ¶
func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message
func (*HealthCheckRequest) Reset ¶
func (x *HealthCheckRequest) Reset()
func (*HealthCheckRequest) String ¶
func (x *HealthCheckRequest) String() string
type HealthCheckResponse ¶
type HealthCheckResponse struct { Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=grpc.health.v1.HealthCheckResponse_ServingStatus" json:"status,omitempty"` // contains filtered or unexported fields }
func (*HealthCheckResponse) Descriptor
deprecated
func (*HealthCheckResponse) Descriptor() ([]byte, []int)
Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.
func (*HealthCheckResponse) GetStatus ¶
func (x *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus
func (*HealthCheckResponse) ProtoMessage ¶
func (*HealthCheckResponse) ProtoMessage()
func (*HealthCheckResponse) ProtoReflect ¶
func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message
func (*HealthCheckResponse) Reset ¶
func (x *HealthCheckResponse) Reset()
func (*HealthCheckResponse) String ¶
func (x *HealthCheckResponse) String() string
type HealthCheckResponse_ServingStatus ¶
type HealthCheckResponse_ServingStatus int32
const ( HealthCheckResponse_UNKNOWN HealthCheckResponse_ServingStatus = 0 HealthCheckResponse_SERVING HealthCheckResponse_ServingStatus = 1 HealthCheckResponse_NOT_SERVING HealthCheckResponse_ServingStatus = 2 HealthCheckResponse_SERVICE_UNKNOWN HealthCheckResponse_ServingStatus = 3 // Used only by the Watch method. )
func (HealthCheckResponse_ServingStatus) Descriptor ¶
func (HealthCheckResponse_ServingStatus) Descriptor() protoreflect.EnumDescriptor
func (HealthCheckResponse_ServingStatus) Enum ¶
func (x HealthCheckResponse_ServingStatus) Enum() *HealthCheckResponse_ServingStatus
func (HealthCheckResponse_ServingStatus) EnumDescriptor
deprecated
func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use HealthCheckResponse_ServingStatus.Descriptor instead.
func (HealthCheckResponse_ServingStatus) Number ¶
func (x HealthCheckResponse_ServingStatus) Number() protoreflect.EnumNumber
func (HealthCheckResponse_ServingStatus) String ¶
func (x HealthCheckResponse_ServingStatus) String() string
func (HealthCheckResponse_ServingStatus) Type ¶
func (HealthCheckResponse_ServingStatus) Type() protoreflect.EnumType
type HealthClient ¶
type HealthClient interface { Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) Watch(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (Health_WatchClient, error) }
HealthClient is the client API for Health service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewHealthClient ¶
func NewHealthClient(cc grpc.ClientConnInterface) HealthClient
type HealthServer ¶
type HealthServer interface { Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) Watch(*HealthCheckRequest, Health_WatchServer) error }
HealthServer is the server API for Health service.
type Health_WatchClient ¶
type Health_WatchClient interface { Recv() (*HealthCheckResponse, error) grpc.ClientStream }
type Health_WatchServer ¶
type Health_WatchServer interface { Send(*HealthCheckResponse) error grpc.ServerStream }
type JoinRequest ¶
type JoinRequest struct { // Only used in official matches to guarantee that only one process will assume that player position (team and number). // The bot process will receive this token as an argument, and must send it to the server in this message. Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // Identifies the protocol version of the bot. ProtocolVersion string `protobuf:"bytes,2,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"` // Identify the bot's team side (Team_Home or Team_Away) TeamSide Team_Side `protobuf:"varint,3,opt,name=team_side,json=teamSide,proto3,enum=lugo.Team_Side" json:"team_side,omitempty"` // Player's number 1-11 Number uint32 `protobuf:"varint,4,opt,name=number,proto3" json:"number,omitempty"` // Position where the player must be set at "GetReady" state (at beginning of the match or after a goal) InitPosition *Point `protobuf:"bytes,5,opt,name=init_position,json=initPosition,proto3" json:"init_position,omitempty"` // contains filtered or unexported fields }
JoinRequest define the player configuration to the game.
func (*JoinRequest) Descriptor
deprecated
func (*JoinRequest) Descriptor() ([]byte, []int)
Deprecated: Use JoinRequest.ProtoReflect.Descriptor instead.
func (*JoinRequest) GetInitPosition ¶
func (x *JoinRequest) GetInitPosition() *Point
func (*JoinRequest) GetNumber ¶
func (x *JoinRequest) GetNumber() uint32
func (*JoinRequest) GetProtocolVersion ¶
func (x *JoinRequest) GetProtocolVersion() string
func (*JoinRequest) GetTeamSide ¶
func (x *JoinRequest) GetTeamSide() Team_Side
func (*JoinRequest) GetToken ¶
func (x *JoinRequest) GetToken() string
func (*JoinRequest) ProtoMessage ¶
func (*JoinRequest) ProtoMessage()
func (*JoinRequest) ProtoReflect ¶
func (x *JoinRequest) ProtoReflect() protoreflect.Message
func (*JoinRequest) Reset ¶
func (x *JoinRequest) Reset()
func (*JoinRequest) String ¶
func (x *JoinRequest) String() string
type Jump ¶
type Jump struct { // Goalkeeper's velocity during the jump. Velocity *Velocity `protobuf:"bytes,1,opt,name=velocity,proto3" json:"velocity,omitempty"` // contains filtered or unexported fields }
Changes the goalkeepers velocity in a higher speed. The goalkeepers may move kicker than other players when they jump, however the jump movement cannot be interrupted after triggered. (read specs to find out the number of turns the jump lasts)
func (*Jump) Descriptor
deprecated
func (*Jump) GetVelocity ¶
func (*Jump) ProtoMessage ¶
func (*Jump) ProtoMessage()
func (*Jump) ProtoReflect ¶
func (x *Jump) ProtoReflect() protoreflect.Message
type Kick ¶
type Kick struct { // Kick velocity (it won't be necessarily the final ball velocity) Velocity *Velocity `protobuf:"bytes,1,opt,name=velocity,proto3" json:"velocity,omitempty"` // contains filtered or unexported fields }
The kick order is only executed by the ball holder, and it is processed immediately. Important: The kick velocity is summed to the current ball velocity. The kick speed will suffer a power reduction proportionally to the player direction when the kick is not in the same direction of the player direction. The reduction is calculated based on the angle with the player direction using the formula `SpeedReducerFactor = 0.5 + (0.5 * ((180 - ang) / 180))` In summary, the speed will by reduced proportionally to the angle from 100% at 0 degrees until the limit of 50% at 180 degrees.
func (*Kick) Descriptor
deprecated
func (*Kick) GetVelocity ¶
func (*Kick) ProtoMessage ¶
func (*Kick) ProtoMessage()
func (*Kick) ProtoReflect ¶
func (x *Kick) ProtoReflect() protoreflect.Message
type Move ¶
type Move struct { // The nex Velocity Velocity *Velocity `protobuf:"bytes,1,opt,name=velocity,proto3" json:"velocity,omitempty"` // contains filtered or unexported fields }
Order to ask the server to change the player velocity (direction and speed). This order replaces the current player velocity, and the new velocity attribute will be immediately processed in that turn. There is a limit speed to the player. The server will cap the velocity if the request is higher than the limit.
func (*Move) Descriptor
deprecated
func (*Move) GetVelocity ¶
func (*Move) ProtoMessage ¶
func (*Move) ProtoMessage()
func (*Move) ProtoReflect ¶
func (x *Move) ProtoReflect() protoreflect.Message
type NextOrderRequest ¶
type NextOrderRequest struct {
// contains filtered or unexported fields
}
func (*NextOrderRequest) Descriptor
deprecated
func (*NextOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use NextOrderRequest.ProtoReflect.Descriptor instead.
func (*NextOrderRequest) ProtoMessage ¶
func (*NextOrderRequest) ProtoMessage()
func (*NextOrderRequest) ProtoReflect ¶
func (x *NextOrderRequest) ProtoReflect() protoreflect.Message
func (*NextOrderRequest) Reset ¶
func (x *NextOrderRequest) Reset()
func (*NextOrderRequest) String ¶
func (x *NextOrderRequest) String() string
type NextTurnRequest ¶
type NextTurnRequest struct {
// contains filtered or unexported fields
}
func (*NextTurnRequest) Descriptor
deprecated
func (*NextTurnRequest) Descriptor() ([]byte, []int)
Deprecated: Use NextTurnRequest.ProtoReflect.Descriptor instead.
func (*NextTurnRequest) ProtoMessage ¶
func (*NextTurnRequest) ProtoMessage()
func (*NextTurnRequest) ProtoReflect ¶
func (x *NextTurnRequest) ProtoReflect() protoreflect.Message
func (*NextTurnRequest) Reset ¶
func (x *NextTurnRequest) Reset()
func (*NextTurnRequest) String ¶
func (x *NextTurnRequest) String() string
type Order ¶
type Order struct { // Types that are assignable to Action: // *Order_Move // *Order_Catch // *Order_Kick // *Order_Jump Action isOrder_Action `protobuf_oneof:"action"` // contains filtered or unexported fields }
Order to the game server. To be sent by players during the Listening phase.
func (*Order) Descriptor
deprecated
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) ProtoReflect ¶
func (x *Order) ProtoReflect() protoreflect.Message
type OrderResponse ¶
type OrderResponse struct { // Define if the order will be correctly processed. Code OrderResponse_StatusCode `protobuf:"varint,1,opt,name=code,proto3,enum=lugo.OrderResponse_StatusCode" json:"code,omitempty"` // String message used for debugging proposes. Details string `protobuf:"bytes,2,opt,name=details,proto3" json:"details,omitempty"` // contains filtered or unexported fields }
Message sent to the player as a response after sending a order set to the the server.
func (*OrderResponse) Descriptor
deprecated
func (*OrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use OrderResponse.ProtoReflect.Descriptor instead.
func (*OrderResponse) GetCode ¶
func (x *OrderResponse) GetCode() OrderResponse_StatusCode
func (*OrderResponse) GetDetails ¶
func (x *OrderResponse) GetDetails() string
func (*OrderResponse) ProtoMessage ¶
func (*OrderResponse) ProtoMessage()
func (*OrderResponse) ProtoReflect ¶
func (x *OrderResponse) ProtoReflect() protoreflect.Message
func (*OrderResponse) Reset ¶
func (x *OrderResponse) Reset()
func (*OrderResponse) String ¶
func (x *OrderResponse) String() string
type OrderResponse_StatusCode ¶
type OrderResponse_StatusCode int32
const ( OrderResponse_SUCCESS OrderResponse_StatusCode = 0 OrderResponse_UNKNOWN_PLAYER OrderResponse_StatusCode = 1 OrderResponse_NOT_LISTENING OrderResponse_StatusCode = 2 OrderResponse_WRONG_TURN OrderResponse_StatusCode = 3 OrderResponse_OTHER OrderResponse_StatusCode = 99 )
func (OrderResponse_StatusCode) Descriptor ¶
func (OrderResponse_StatusCode) Descriptor() protoreflect.EnumDescriptor
func (OrderResponse_StatusCode) Enum ¶
func (x OrderResponse_StatusCode) Enum() *OrderResponse_StatusCode
func (OrderResponse_StatusCode) EnumDescriptor
deprecated
func (OrderResponse_StatusCode) EnumDescriptor() ([]byte, []int)
Deprecated: Use OrderResponse_StatusCode.Descriptor instead.
func (OrderResponse_StatusCode) Number ¶
func (x OrderResponse_StatusCode) Number() protoreflect.EnumNumber
func (OrderResponse_StatusCode) String ¶
func (x OrderResponse_StatusCode) String() string
func (OrderResponse_StatusCode) Type ¶
func (OrderResponse_StatusCode) Type() protoreflect.EnumType
type OrderSet ¶
type OrderSet struct { // Turn which this order set should be processed at. Turn uint32 `protobuf:"varint,1,opt,name=turn,proto3" json:"turn,omitempty"` // List of orders in the expected order of execution Orders []*Order `protobuf:"bytes,2,rep,name=orders,proto3" json:"orders,omitempty"` // String message used for debugging proposes. DebugMessage string `protobuf:"bytes,3,opt,name=debug_message,json=debugMessage,proto3" json:"debug_message,omitempty"` // contains filtered or unexported fields }
Message containing the orders the player want to send to the server in that turn.
func (*OrderSet) Descriptor
deprecated
func (*OrderSet) GetDebugMessage ¶
func (*OrderSet) ProtoMessage ¶
func (*OrderSet) ProtoMessage()
func (*OrderSet) ProtoReflect ¶
func (x *OrderSet) ProtoReflect() protoreflect.Message
type Order_Catch ¶
type Order_Catch struct {
Catch *Catch `protobuf:"bytes,2,opt,name=catch,proto3,oneof"`
}
func (*Order_Catch) LugoOrdersUnifier ¶
func (*Order_Catch) LugoOrdersUnifier()
type Order_Jump ¶
type Order_Jump struct {
Jump *Jump `protobuf:"bytes,4,opt,name=jump,proto3,oneof"`
}
func (*Order_Jump) LugoOrdersUnifier ¶
func (*Order_Jump) LugoOrdersUnifier()
type Order_Kick ¶
type Order_Kick struct {
Kick *Kick `protobuf:"bytes,3,opt,name=kick,proto3,oneof"`
}
func (*Order_Kick) LugoOrdersUnifier ¶
func (*Order_Kick) LugoOrdersUnifier()
type Order_Move ¶
type Order_Move struct {
Move *Move `protobuf:"bytes,1,opt,name=move,proto3,oneof"`
}
func (*Order_Move) LugoOrdersUnifier ¶
func (*Order_Move) LugoOrdersUnifier()
type PauseResumeRequest ¶
type PauseResumeRequest struct {
// contains filtered or unexported fields
}
func (*PauseResumeRequest) Descriptor
deprecated
func (*PauseResumeRequest) Descriptor() ([]byte, []int)
Deprecated: Use PauseResumeRequest.ProtoReflect.Descriptor instead.
func (*PauseResumeRequest) ProtoMessage ¶
func (*PauseResumeRequest) ProtoMessage()
func (*PauseResumeRequest) ProtoReflect ¶
func (x *PauseResumeRequest) ProtoReflect() protoreflect.Message
func (*PauseResumeRequest) Reset ¶
func (x *PauseResumeRequest) Reset()
func (*PauseResumeRequest) String ¶
func (x *PauseResumeRequest) String() string
type Player ¶
type Player struct { // Number of this player in its team (1-11) Number uint32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` // Current player position Position *Point `protobuf:"bytes,2,opt,name=position,proto3" json:"position,omitempty"` // Current player velocity Velocity *Velocity `protobuf:"bytes,3,opt,name=velocity,proto3" json:"velocity,omitempty"` // Team side which its playing in (it's used to speed up some readings since the player element will be in a list // of players of a team) TeamSide Team_Side `protobuf:"varint,4,opt,name=team_side,json=teamSide,proto3,enum=lugo.Team_Side" json:"team_side,omitempty"` // Default position when it's position is reset InitPosition *Point `protobuf:"bytes,5,opt,name=init_position,json=initPosition,proto3" json:"init_position,omitempty"` // contains filtered or unexported fields }
Stores all player attributes
func (*Player) Descriptor
deprecated
func (*Player) GetInitPosition ¶
func (*Player) GetPosition ¶
func (*Player) GetTeamSide ¶
func (*Player) GetVelocity ¶
func (*Player) ProtoMessage ¶
func (*Player) ProtoMessage()
func (*Player) ProtoReflect ¶
func (x *Player) ProtoReflect() protoreflect.Message
type PlayerOrder ¶
type PlayerOrder interface { LugoOrdersUnifier() // contains filtered or unexported methods }
PlayerOrder is a hack to create a single type that includes all orders structs. The structs and interfaces generated from the protobuf files does not creates a common type that allows us to set a type of argument. So this interface make it possible
type PlayerProperties ¶
type PlayerProperties struct { Side Team_Side `protobuf:"varint,1,opt,name=side,proto3,enum=lugo.Team_Side" json:"side,omitempty"` Number uint32 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` Position *Point `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"` Velocity *Velocity `protobuf:"bytes,4,opt,name=velocity,proto3" json:"velocity,omitempty"` // contains filtered or unexported fields }
func (*PlayerProperties) Descriptor
deprecated
func (*PlayerProperties) Descriptor() ([]byte, []int)
Deprecated: Use PlayerProperties.ProtoReflect.Descriptor instead.
func (*PlayerProperties) GetNumber ¶
func (x *PlayerProperties) GetNumber() uint32
func (*PlayerProperties) GetPosition ¶
func (x *PlayerProperties) GetPosition() *Point
func (*PlayerProperties) GetSide ¶
func (x *PlayerProperties) GetSide() Team_Side
func (*PlayerProperties) GetVelocity ¶
func (x *PlayerProperties) GetVelocity() *Velocity
func (*PlayerProperties) ProtoMessage ¶
func (*PlayerProperties) ProtoMessage()
func (*PlayerProperties) ProtoReflect ¶
func (x *PlayerProperties) ProtoReflect() protoreflect.Message
func (*PlayerProperties) Reset ¶
func (x *PlayerProperties) Reset()
func (*PlayerProperties) String ¶
func (x *PlayerProperties) String() string
type Point ¶
type Point struct { // Distance from the Y axis to right. X int32 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` // Distance from the X axis to up. Y int32 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"` // contains filtered or unexported fields }
Point represents one position on the cartesian plan of the game field. The coordinates start at the left bottom corner from the top view .
func FindIntersection ¶
FindIntersection finds the point where two lines intersect each other. One line is define by the points a1 and a2, and the second line is defined by b1 and b2. If the lines do not touch each other (e.g. they are parallel) it returns an error, otherwise the point will be returned. If the intersection point is between {a1, a2} and {b1,b2}, then the the second returned value will be true.
https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection#Given_two_points_on_each_line
func (*Point) Descriptor
deprecated
func (Point) DistanceTo ¶
DistanceTo finds the distance of this point to a target point
func (Point) MiddlePointTo ¶
MiddlePointTo finds a point between this point and a target point
func (*Point) ProtoMessage ¶
func (*Point) ProtoMessage()
func (*Point) ProtoReflect ¶
func (x *Point) ProtoReflect() protoreflect.Message
type RemoteClient ¶
type RemoteClient interface { PauseOrResume(ctx context.Context, in *PauseResumeRequest, opts ...grpc.CallOption) (*CommandResponse, error) NextTurn(ctx context.Context, in *NextTurnRequest, opts ...grpc.CallOption) (*CommandResponse, error) NextOrder(ctx context.Context, in *NextOrderRequest, opts ...grpc.CallOption) (*CommandResponse, error) SetBallProperties(ctx context.Context, in *BallProperties, opts ...grpc.CallOption) (*CommandResponse, error) SetPlayerProperties(ctx context.Context, in *PlayerProperties, opts ...grpc.CallOption) (*CommandResponse, error) SetGameProperties(ctx context.Context, in *GameProperties, opts ...grpc.CallOption) (*CommandResponse, error) ResumeListeningPhase(ctx context.Context, in *ResumeListeningRequest, opts ...grpc.CallOption) (*ResumeListeningResponse, error) }
RemoteClient is the client API for Remote service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRemoteClient ¶
func NewRemoteClient(cc grpc.ClientConnInterface) RemoteClient
type RemoteServer ¶
type RemoteServer interface { PauseOrResume(context.Context, *PauseResumeRequest) (*CommandResponse, error) NextTurn(context.Context, *NextTurnRequest) (*CommandResponse, error) NextOrder(context.Context, *NextOrderRequest) (*CommandResponse, error) SetBallProperties(context.Context, *BallProperties) (*CommandResponse, error) SetPlayerProperties(context.Context, *PlayerProperties) (*CommandResponse, error) SetGameProperties(context.Context, *GameProperties) (*CommandResponse, error) ResumeListeningPhase(context.Context, *ResumeListeningRequest) (*ResumeListeningResponse, error) }
RemoteServer is the server API for Remote service.
type ResumeListeningRequest ¶
type ResumeListeningRequest struct {
// contains filtered or unexported fields
}
func (*ResumeListeningRequest) Descriptor
deprecated
func (*ResumeListeningRequest) Descriptor() ([]byte, []int)
Deprecated: Use ResumeListeningRequest.ProtoReflect.Descriptor instead.
func (*ResumeListeningRequest) ProtoMessage ¶
func (*ResumeListeningRequest) ProtoMessage()
func (*ResumeListeningRequest) ProtoReflect ¶
func (x *ResumeListeningRequest) ProtoReflect() protoreflect.Message
func (*ResumeListeningRequest) Reset ¶
func (x *ResumeListeningRequest) Reset()
func (*ResumeListeningRequest) String ¶
func (x *ResumeListeningRequest) String() string
type ResumeListeningResponse ¶
type ResumeListeningResponse struct {
// contains filtered or unexported fields
}
func (*ResumeListeningResponse) Descriptor
deprecated
func (*ResumeListeningResponse) Descriptor() ([]byte, []int)
Deprecated: Use ResumeListeningResponse.ProtoReflect.Descriptor instead.
func (*ResumeListeningResponse) ProtoMessage ¶
func (*ResumeListeningResponse) ProtoMessage()
func (*ResumeListeningResponse) ProtoReflect ¶
func (x *ResumeListeningResponse) ProtoReflect() protoreflect.Message
func (*ResumeListeningResponse) Reset ¶
func (x *ResumeListeningResponse) Reset()
func (*ResumeListeningResponse) String ¶
func (x *ResumeListeningResponse) String() string
type ShotClock ¶
type ShotClock struct { // Team side of the team in attack. TeamSide Team_Side `protobuf:"varint,6,opt,name=team_side,json=teamSide,proto3,enum=lugo.Team_Side" json:"team_side,omitempty"` // Remaining turns the attack team may hold the ball RemainingTurns uint32 `protobuf:"varint,7,opt,name=remaining_turns,json=remainingTurns,proto3" json:"remaining_turns,omitempty"` // contains filtered or unexported fields }
Stores the side of the team in attack and the time remaining holding the ball. The team side is changed as soon a bot of the defense team catch the ball.
func (*ShotClock) Descriptor
deprecated
func (*ShotClock) GetRemainingTurns ¶
func (*ShotClock) GetTeamSide ¶
func (*ShotClock) ProtoMessage ¶
func (*ShotClock) ProtoMessage()
func (*ShotClock) ProtoReflect ¶
func (x *ShotClock) ProtoReflect() protoreflect.Message
type StartRequest ¶
type StartRequest struct { // Not used on localhost WatcherUuid string `protobuf:"bytes,1,opt,name=watcher_uuid,json=watcherUuid,proto3" json:"watcher_uuid,omitempty"` // contains filtered or unexported fields }
func (*StartRequest) Descriptor
deprecated
func (*StartRequest) Descriptor() ([]byte, []int)
Deprecated: Use StartRequest.ProtoReflect.Descriptor instead.
func (*StartRequest) GetWatcherUuid ¶
func (x *StartRequest) GetWatcherUuid() string
func (*StartRequest) ProtoMessage ¶
func (*StartRequest) ProtoMessage()
func (*StartRequest) ProtoReflect ¶
func (x *StartRequest) ProtoReflect() protoreflect.Message
func (*StartRequest) Reset ¶
func (x *StartRequest) Reset()
func (*StartRequest) String ¶
func (x *StartRequest) String() string
type Team ¶
type Team struct { // List of player in the team Players []*Player `protobuf:"bytes,1,rep,name=players,proto3" json:"players,omitempty"` // Team name Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Team score in the present turn Score uint32 `protobuf:"varint,3,opt,name=score,proto3" json:"score,omitempty"` // Side which the team is playing on. Side Team_Side `protobuf:"varint,4,opt,name=side,proto3,enum=lugo.Team_Side" json:"side,omitempty"` // contains filtered or unexported fields }
Stores all team elements and data.
func (*Team) Descriptor
deprecated
func (*Team) GetPlayers ¶
func (*Team) ProtoMessage ¶
func (*Team) ProtoMessage()
func (*Team) ProtoReflect ¶
func (x *Team) ProtoReflect() protoreflect.Message
type TeamColor ¶
type TeamColor struct { Red uint32 `protobuf:"varint,1,opt,name=red,proto3" json:"red,omitempty"` Green uint32 `protobuf:"varint,2,opt,name=green,proto3" json:"green,omitempty"` Blue uint32 `protobuf:"varint,4,opt,name=blue,proto3" json:"blue,omitempty"` // contains filtered or unexported fields }
func (*TeamColor) Descriptor
deprecated
func (*TeamColor) ProtoMessage ¶
func (*TeamColor) ProtoMessage()
func (*TeamColor) ProtoReflect ¶
func (x *TeamColor) ProtoReflect() protoreflect.Message
type TeamColors ¶
type TeamColors struct { Primary *TeamColor `protobuf:"bytes,1,opt,name=primary,proto3" json:"primary,omitempty"` Secondary *TeamColor `protobuf:"bytes,2,opt,name=secondary,proto3" json:"secondary,omitempty"` // contains filtered or unexported fields }
func (*TeamColors) Descriptor
deprecated
func (*TeamColors) Descriptor() ([]byte, []int)
Deprecated: Use TeamColors.ProtoReflect.Descriptor instead.
func (*TeamColors) GetPrimary ¶
func (x *TeamColors) GetPrimary() *TeamColor
func (*TeamColors) GetSecondary ¶
func (x *TeamColors) GetSecondary() *TeamColor
func (*TeamColors) ProtoMessage ¶
func (*TeamColors) ProtoMessage()
func (*TeamColors) ProtoReflect ¶
func (x *TeamColors) ProtoReflect() protoreflect.Message
func (*TeamColors) Reset ¶
func (x *TeamColors) Reset()
func (*TeamColors) String ¶
func (x *TeamColors) String() string
type TeamSettings ¶
type TeamSettings struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Avatar string `protobuf:"bytes,2,opt,name=avatar,proto3" json:"avatar,omitempty"` Colors *TeamColors `protobuf:"bytes,3,opt,name=colors,proto3" json:"colors,omitempty"` // contains filtered or unexported fields }
func (*TeamSettings) Descriptor
deprecated
func (*TeamSettings) Descriptor() ([]byte, []int)
Deprecated: Use TeamSettings.ProtoReflect.Descriptor instead.
func (*TeamSettings) GetAvatar ¶
func (x *TeamSettings) GetAvatar() string
func (*TeamSettings) GetColors ¶
func (x *TeamSettings) GetColors() *TeamColors
func (*TeamSettings) GetName ¶
func (x *TeamSettings) GetName() string
func (*TeamSettings) ProtoMessage ¶
func (*TeamSettings) ProtoMessage()
func (*TeamSettings) ProtoReflect ¶
func (x *TeamSettings) ProtoReflect() protoreflect.Message
func (*TeamSettings) Reset ¶
func (x *TeamSettings) Reset()
func (*TeamSettings) String ¶
func (x *TeamSettings) String() string
type Team_Side ¶
type Team_Side int32
func (Team_Side) Descriptor ¶
func (Team_Side) Descriptor() protoreflect.EnumDescriptor
func (Team_Side) EnumDescriptor
deprecated
func (Team_Side) Number ¶
func (x Team_Side) Number() protoreflect.EnumNumber
func (Team_Side) Type ¶
func (Team_Side) Type() protoreflect.EnumType
type UnimplementedBroadcastServer ¶
type UnimplementedBroadcastServer struct { }
UnimplementedBroadcastServer can be embedded to have forward compatible implementations.
func (*UnimplementedBroadcastServer) GetGameSetup ¶
func (*UnimplementedBroadcastServer) GetGameSetup(context.Context, *WatcherRequest) (*GameSetup, error)
func (*UnimplementedBroadcastServer) OnEvent ¶
func (*UnimplementedBroadcastServer) OnEvent(*WatcherRequest, Broadcast_OnEventServer) error
func (*UnimplementedBroadcastServer) StartGame ¶
func (*UnimplementedBroadcastServer) StartGame(context.Context, *StartRequest) (*GameSetup, error)
type UnimplementedGameServer ¶
type UnimplementedGameServer struct { }
UnimplementedGameServer can be embedded to have forward compatible implementations.
func (*UnimplementedGameServer) JoinATeam ¶
func (*UnimplementedGameServer) JoinATeam(*JoinRequest, Game_JoinATeamServer) error
func (*UnimplementedGameServer) SendOrders ¶
func (*UnimplementedGameServer) SendOrders(context.Context, *OrderSet) (*OrderResponse, error)
type UnimplementedHealthServer ¶
type UnimplementedHealthServer struct { }
UnimplementedHealthServer can be embedded to have forward compatible implementations.
func (*UnimplementedHealthServer) Check ¶
func (*UnimplementedHealthServer) Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
func (*UnimplementedHealthServer) Watch ¶
func (*UnimplementedHealthServer) Watch(*HealthCheckRequest, Health_WatchServer) error
type UnimplementedRemoteServer ¶
type UnimplementedRemoteServer struct { }
UnimplementedRemoteServer can be embedded to have forward compatible implementations.
func (*UnimplementedRemoteServer) NextOrder ¶
func (*UnimplementedRemoteServer) NextOrder(context.Context, *NextOrderRequest) (*CommandResponse, error)
func (*UnimplementedRemoteServer) NextTurn ¶
func (*UnimplementedRemoteServer) NextTurn(context.Context, *NextTurnRequest) (*CommandResponse, error)
func (*UnimplementedRemoteServer) PauseOrResume ¶
func (*UnimplementedRemoteServer) PauseOrResume(context.Context, *PauseResumeRequest) (*CommandResponse, error)
func (*UnimplementedRemoteServer) ResumeListeningPhase ¶
func (*UnimplementedRemoteServer) ResumeListeningPhase(context.Context, *ResumeListeningRequest) (*ResumeListeningResponse, error)
func (*UnimplementedRemoteServer) SetBallProperties ¶
func (*UnimplementedRemoteServer) SetBallProperties(context.Context, *BallProperties) (*CommandResponse, error)
func (*UnimplementedRemoteServer) SetGameProperties ¶
func (*UnimplementedRemoteServer) SetGameProperties(context.Context, *GameProperties) (*CommandResponse, error)
func (*UnimplementedRemoteServer) SetPlayerProperties ¶
func (*UnimplementedRemoteServer) SetPlayerProperties(context.Context, *PlayerProperties) (*CommandResponse, error)
type Vector ¶
type Vector struct { // Coordinate X to define the vector direction. X float64 `protobuf:"fixed64,1,opt,name=x,proto3" json:"x,omitempty"` // Coordinate Y to define the vector direction. Y float64 `protobuf:"fixed64,2,opt,name=y,proto3" json:"y,omitempty"` // contains filtered or unexported fields }
Vector represent one direction on a cartesian plan
func (*Vector) AddAngleDegree ¶
func (*Vector) AngleDegrees ¶
func (*Vector) Descriptor
deprecated
func (*Vector) MarshalJSON ¶
func (*Vector) Normalize ¶
Normalizes the vector on base 100 (not 1 as conventional) to reduce the loss.
func (*Vector) OppositeAngle ¶
func (Vector) Perpendicular ¶
func (*Vector) ProtoMessage ¶
func (*Vector) ProtoMessage()
func (*Vector) ProtoReflect ¶
func (x *Vector) ProtoReflect() protoreflect.Message
func (*Vector) TargetFrom ¶
func (*Vector) UnmarshalJSON ¶
type Velocity ¶
type Velocity struct { // Direction is a normalised vector that indicates the element direction Direction *Vector `protobuf:"bytes,1,opt,name=direction,proto3" json:"direction,omitempty"` // Speed of the element. Speed float64 `protobuf:"fixed64,2,opt,name=speed,proto3" json:"speed,omitempty"` // contains filtered or unexported fields }
Velocity is a tuple with the direction (a vector) an a speed (float) values. It defines the velocity of an object.
func NewZeroedVelocity ¶
NewZeroedVelocity creates a velocity with speed zero
func (*Velocity) Add ¶
Add two velocities values. The direction will be a simple vector sum, so they will be affected by their magnitude.
func (*Velocity) Descriptor
deprecated
func (*Velocity) GetDirection ¶
func (*Velocity) GetNextPoint ¶
Return the next point the element will be considering the direction and speed.
func (*Velocity) ProtoMessage ¶
func (*Velocity) ProtoMessage()
func (*Velocity) ProtoReflect ¶
func (x *Velocity) ProtoReflect() protoreflect.Message
type WatcherRequest ¶
type WatcherRequest struct { // Not used on localhost Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // contains filtered or unexported fields }
func (*WatcherRequest) Descriptor
deprecated
func (*WatcherRequest) Descriptor() ([]byte, []int)
Deprecated: Use WatcherRequest.ProtoReflect.Descriptor instead.
func (*WatcherRequest) GetUuid ¶
func (x *WatcherRequest) GetUuid() string
func (*WatcherRequest) ProtoMessage ¶
func (*WatcherRequest) ProtoMessage()
func (*WatcherRequest) ProtoReflect ¶
func (x *WatcherRequest) ProtoReflect() protoreflect.Message
func (*WatcherRequest) Reset ¶
func (x *WatcherRequest) Reset()
func (*WatcherRequest) String ¶
func (x *WatcherRequest) String() string