republique

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2019 License: BSD-2-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package republique is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var ActionType_name = map[int32]string{
	0: "COMMENT",
	1: "OPTIONAL",
	2: "MUST_TICK",
}
View Source
var ActionType_value = map[string]int32{
	"COMMENT":   0,
	"OPTIONAL":  1,
	"MUST_TICK": 2,
}
View Source
var Arm_name = map[int32]string{
	0: "SUPPORT",
	1: "INFANTRY",
	2: "CAVALRY",
	3: "ARTILLERY",
	4: "COMMAND",
}
View Source
var Arm_value = map[string]int32{
	"SUPPORT":   0,
	"INFANTRY":  1,
	"CAVALRY":   2,
	"ARTILLERY": 3,
	"COMMAND":   4,
}
View Source
var BattlefieldPosition_name = map[int32]string{
	0: "REAR",
	1: "LEFT",
	2: "CENTRE",
	3: "RIGHT",
	4: "OFF_BOARD",
}
View Source
var BattlefieldPosition_value = map[string]int32{
	"REAR":      0,
	"LEFT":      1,
	"CENTRE":    2,
	"RIGHT":     3,
	"OFF_BOARD": 4,
}
View Source
var CommandRating_name = map[int32]string{
	0: "USELESS",
	1: "CUMBERSOME",
	2: "FUNCTIONAL",
	3: "EFFICIENT",
}
View Source
var CommandRating_value = map[string]int32{
	"USELESS":    0,
	"CUMBERSOME": 1,
	"FUNCTIONAL": 2,
	"EFFICIENT":  3,
}
View Source
var Drill_name = map[int32]string{
	0: "LINEAR",
	1: "MASSED",
	2: "RAPID",
}
View Source
var Drill_value = map[string]int32{
	"LINEAR": 0,
	"MASSED": 1,
	"RAPID":  2,
}
View Source
var Formation_name = map[int32]string{
	0:  "RESERVE",
	1:  "MARCH_COLUMN",
	2:  "ATTACK_COLUMN",
	3:  "CLOSED_COLUMN",
	4:  "LINE",
	5:  "ECHELON",
	6:  "SUPPORTING_LINES",
	7:  "DEBANDE",
	8:  "FORTIFIED",
	9:  "COLUMN",
	10: "DOUBLE_LINE",
}
View Source
var Formation_value = map[string]int32{
	"RESERVE":          0,
	"MARCH_COLUMN":     1,
	"ATTACK_COLUMN":    2,
	"CLOSED_COLUMN":    3,
	"LINE":             4,
	"ECHELON":          5,
	"SUPPORTING_LINES": 6,
	"DEBANDE":          7,
	"FORTIFIED":        8,
	"COLUMN":           9,
	"DOUBLE_LINE":      10,
}
View Source
var MapSide_name = map[int32]string{
	0: "FRONT",
	1: "LEFT_FLANK",
	2: "RIGHT_FLANK",
	3: "TOP",
}
View Source
var MapSide_value = map[string]int32{
	"FRONT":       0,
	"LEFT_FLANK":  1,
	"RIGHT_FLANK": 2,
	"TOP":         3,
}
View Source
var MoraleState_name = map[int32]string{
	0: "RESTING",
	1: "GOOD",
	2: "UNFORMED",
	3: "RATTLED",
	4: "SHAKEN",
	5: "DEMORALISED",
}
View Source
var MoraleState_value = map[string]int32{
	"RESTING":     0,
	"GOOD":        1,
	"UNFORMED":    2,
	"RATTLED":     3,
	"SHAKEN":      4,
	"DEMORALISED": 5,
}
View Source
var Nationality_name = map[int32]string{
	0:  "ANY_NATION",
	1:  "FRENCH",
	2:  "BRITISH",
	3:  "RUSSIAN",
	4:  "PRUSSIAN",
	6:  "SPANISH",
	7:  "OTTOMAN",
	8:  "PERSIAN",
	9:  "AUSTRIAN",
	10: "AMERICAN",
	11: "INDIAN",
	12: "ITALIAN",
	13: "BAVARIAN",
	14: "DUTCH",
	15: "BELGIAN",
	16: "NASSAU",
	17: "SWISS",
	18: "PAPAL_STATES",
	19: "AFRICAN",
	20: "NATIVE",
	21: "COLONIAL",
	22: "SWEDEN",
}
View Source
var Nationality_value = map[string]int32{
	"ANY_NATION":   0,
	"FRENCH":       1,
	"BRITISH":      2,
	"RUSSIAN":      3,
	"PRUSSIAN":     4,
	"SPANISH":      6,
	"OTTOMAN":      7,
	"PERSIAN":      8,
	"AUSTRIAN":     9,
	"AMERICAN":     10,
	"INDIAN":       11,
	"ITALIAN":      12,
	"BAVARIAN":     13,
	"DUTCH":        14,
	"BELGIAN":      15,
	"NASSAU":       16,
	"SWISS":        17,
	"PAPAL_STATES": 18,
	"AFRICAN":      19,
	"NATIVE":       20,
	"COLONIAL":     21,
	"SWEDEN":       22,
}
View Source
var Order_name = map[int32]string{
	0:  "NO_ORDERS",
	1:  "MARCH",
	2:  "MOVE",
	3:  "DEFEND",
	4:  "WITHDRAW",
	5:  "ATTACK",
	6:  "RALLY",
	7:  "ENGAGE",
	8:  "PURSUIT",
	9:  "ADVANCE",
	10: "CHARGE",
	11: "FIRE",
	12: "RESTAGE",
}
View Source
var Order_value = map[string]int32{
	"NO_ORDERS": 0,
	"MARCH":     1,
	"MOVE":      2,
	"DEFEND":    3,
	"WITHDRAW":  4,
	"ATTACK":    5,
	"RALLY":     6,
	"ENGAGE":    7,
	"PURSUIT":   8,
	"ADVANCE":   9,
	"CHARGE":    10,
	"FIRE":      11,
	"RESTAGE":   12,
}
View Source
var Phase_name = map[int32]string{
	0: "PREGAME",
	1: "LEADERS",
	2: "MOVEMENT1",
	3: "FIRING1",
	4: "ASSAULT1",
	5: "PANIC1",
	6: "MOVEMENT2",
	7: "FIRING2",
	8: "ASSAULT2",
	9: "PANIC2",
}
View Source
var Phase_value = map[string]int32{
	"PREGAME":   0,
	"LEADERS":   1,
	"MOVEMENT1": 2,
	"FIRING1":   3,
	"ASSAULT1":  4,
	"PANIC1":    5,
	"MOVEMENT2": 6,
	"FIRING2":   7,
	"ASSAULT2":  8,
	"PANIC2":    9,
}
View Source
var Rank_name = map[int32]string{
	0:  "BATTALION",
	1:  "BRIGADE",
	2:  "DIVISION",
	3:  "CORPS",
	4:  "WING",
	5:  "ARMY",
	6:  "NATIONAL_LEADER",
	7:  "ARTILLERY_DIV",
	8:  "CAVALRY_BDE",
	9:  "CAVALRY_DIV",
	10: "BATTERY",
	11: "GUN_PARK",
}
View Source
var Rank_value = map[string]int32{
	"BATTALION":       0,
	"BRIGADE":         1,
	"DIVISION":        2,
	"CORPS":           3,
	"WING":            4,
	"ARMY":            5,
	"NATIONAL_LEADER": 6,
	"ARTILLERY_DIV":   7,
	"CAVALRY_BDE":     8,
	"CAVALRY_DIV":     9,
	"BATTERY":         10,
	"GUN_PARK":        11,
}
View Source
var SkirmishRating_name = map[int32]string{
	0: "POOR",
	1: "ADEQUATE",
	2: "CRACK_SHOT",
	3: "EXCELLENT",
}
View Source
var SkirmishRating_value = map[string]int32{
	"POOR":       0,
	"ADEQUATE":   1,
	"CRACK_SHOT": 2,
	"EXCELLENT":  3,
}
View Source
var UnitGrade_name = map[int32]string{
	0: "CIVILIAN",
	1: "MILITIA",
	2: "CONSCRIPT",
	3: "REGULAR",
	4: "VETERAN",
	5: "ELITE",
	6: "GUARD",
}
View Source
var UnitGrade_value = map[string]int32{
	"CIVILIAN":  0,
	"MILITIA":   1,
	"CONSCRIPT": 2,
	"REGULAR":   3,
	"VETERAN":   4,
	"ELITE":     5,
	"GUARD":     6,
}
View Source
var UnitType_name = map[int32]string{
	0:  "SUPPORT_UNIT",
	1:  "INFANTRY_LINE",
	2:  "INFANTRY_LIGHT",
	3:  "INFANTRY_GRENADIER",
	4:  "INFANTRY_IRREGULAR",
	5:  "INFANTRY_RIFLES",
	6:  "CAVALRY_LIGHT",
	7:  "CAVALRY_HUSSAR",
	8:  "CAVALRY_DRAGOON",
	9:  "CAVALRY_CUIRASSIER",
	10: "CAVALRY_COSSACK",
	11: "CAVALRY_HEAVY",
	12: "CAVALRY_MEDIUM",
	13: "CAVALRY_LANCER",
	14: "ARTILLERY_BN",
	15: "ARTILLERY_LIGHT",
	16: "ARTILLERY_MEDIUM",
	17: "ARTILLERY_HEAVY",
	18: "ARTILLERY_HORSE",
	19: "ARTILLERY_LIGHT_HORSE",
}
View Source
var UnitType_value = map[string]int32{
	"SUPPORT_UNIT":          0,
	"INFANTRY_LINE":         1,
	"INFANTRY_LIGHT":        2,
	"INFANTRY_GRENADIER":    3,
	"INFANTRY_IRREGULAR":    4,
	"INFANTRY_RIFLES":       5,
	"CAVALRY_LIGHT":         6,
	"CAVALRY_HUSSAR":        7,
	"CAVALRY_DRAGOON":       8,
	"CAVALRY_CUIRASSIER":    9,
	"CAVALRY_COSSACK":       10,
	"CAVALRY_HEAVY":         11,
	"CAVALRY_MEDIUM":        12,
	"CAVALRY_LANCER":        13,
	"ARTILLERY_BN":          14,
	"ARTILLERY_LIGHT":       15,
	"ARTILLERY_MEDIUM":      16,
	"ARTILLERY_HEAVY":       17,
	"ARTILLERY_HORSE":       18,
	"ARTILLERY_LIGHT_HORSE": 19,
}

Functions

func RegisterGameServiceHandler

func RegisterGameServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterGameServiceHandler registers the http handlers for service GameService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterGameServiceHandlerClient

func RegisterGameServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GameServiceClient) error

RegisterGameServiceHandlerClient registers the http handlers for service GameService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GameServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GameServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "GameServiceClient" to call the correct interceptors.

func RegisterGameServiceHandlerFromEndpoint

func RegisterGameServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterGameServiceHandlerFromEndpoint is same as RegisterGameServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterGameServiceServer

func RegisterGameServiceServer(s *grpc.Server, srv GameServiceServer)

Types

type Action

type Action struct {
	Done                 bool       `protobuf:"varint,1,opt,name=done,proto3" json:"done,omitempty"`
	Description          string     `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Type                 ActionType `protobuf:"varint,3,opt,name=type,proto3,enum=republique.ActionType" json:"type,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*Action) Descriptor

func (*Action) Descriptor() ([]byte, []int)

func (*Action) GetDescription

func (m *Action) GetDescription() string

func (*Action) GetDone

func (m *Action) GetDone() bool

func (*Action) GetType

func (m *Action) GetType() ActionType

func (*Action) ProtoMessage

func (*Action) ProtoMessage()

func (*Action) Reset

func (m *Action) Reset()

func (*Action) String

func (m *Action) String() string

func (*Action) XXX_DiscardUnknown

func (m *Action) XXX_DiscardUnknown()

func (*Action) XXX_Marshal

func (m *Action) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Action) XXX_Merge

func (m *Action) XXX_Merge(src proto.Message)

func (*Action) XXX_Size

func (m *Action) XXX_Size() int

func (*Action) XXX_Unmarshal

func (m *Action) XXX_Unmarshal(b []byte) error

type ActionType

type ActionType int32
const (
	ActionType_COMMENT   ActionType = 0
	ActionType_OPTIONAL  ActionType = 1
	ActionType_MUST_TICK ActionType = 2
)

func (ActionType) EnumDescriptor

func (ActionType) EnumDescriptor() ([]byte, []int)

func (ActionType) String

func (x ActionType) String() string

type Arm

type Arm int32
const (
	Arm_SUPPORT   Arm = 0
	Arm_INFANTRY  Arm = 1
	Arm_CAVALRY   Arm = 2
	Arm_ARTILLERY Arm = 3
	Arm_COMMAND   Arm = 4
)

func (Arm) EnumDescriptor

func (Arm) EnumDescriptor() ([]byte, []int)

func (Arm) String

func (x Arm) String() string

type Arrival

type Arrival struct {
	From                 int32                `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"`
	To                   int32                `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"`
	Percent              int32                `protobuf:"varint,3,opt,name=percent,proto3" json:"percent,omitempty"`
	ComputedTurn         int32                `protobuf:"varint,4,opt,name=computedTurn,proto3" json:"computedTurn,omitempty"`
	ActualArrival        *timestamp.Timestamp `protobuf:"bytes,5,opt,name=actualArrival,proto3" json:"actualArrival,omitempty"`
	Position             BattlefieldPosition  `protobuf:"varint,6,opt,name=position,proto3,enum=republique.BattlefieldPosition" json:"position,omitempty"`
	Contact              bool                 `protobuf:"varint,7,opt,name=contact,proto3" json:"contact,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Arrival) Descriptor

func (*Arrival) Descriptor() ([]byte, []int)

func (*Arrival) GetActualArrival

func (m *Arrival) GetActualArrival() *timestamp.Timestamp

func (*Arrival) GetComputedTurn

func (m *Arrival) GetComputedTurn() int32

func (*Arrival) GetContact

func (m *Arrival) GetContact() bool

func (*Arrival) GetFrom

func (m *Arrival) GetFrom() int32

func (*Arrival) GetPercent

func (m *Arrival) GetPercent() int32

func (*Arrival) GetPosition

func (m *Arrival) GetPosition() BattlefieldPosition

func (*Arrival) GetTo

func (m *Arrival) GetTo() int32

func (*Arrival) ProtoMessage

func (*Arrival) ProtoMessage()

func (*Arrival) Reset

func (m *Arrival) Reset()

func (*Arrival) String

func (m *Arrival) String() string

func (*Arrival) XXX_DiscardUnknown

func (m *Arrival) XXX_DiscardUnknown()

func (*Arrival) XXX_Marshal

func (m *Arrival) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Arrival) XXX_Merge

func (m *Arrival) XXX_Merge(src proto.Message)

func (*Arrival) XXX_Size

func (m *Arrival) XXX_Size() int

func (*Arrival) XXX_Unmarshal

func (m *Arrival) XXX_Unmarshal(b []byte) error

type BattlefieldPosition

type BattlefieldPosition int32
const (
	BattlefieldPosition_REAR      BattlefieldPosition = 0
	BattlefieldPosition_LEFT      BattlefieldPosition = 1
	BattlefieldPosition_CENTRE    BattlefieldPosition = 2
	BattlefieldPosition_RIGHT     BattlefieldPosition = 3
	BattlefieldPosition_OFF_BOARD BattlefieldPosition = 4
)

func (BattlefieldPosition) EnumDescriptor

func (BattlefieldPosition) EnumDescriptor() ([]byte, []int)

func (BattlefieldPosition) String

func (x BattlefieldPosition) String() string

type Command

type Command struct {
	Name                 string              `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	CommanderName        string              `protobuf:"bytes,2,opt,name=commanderName,proto3" json:"commanderName,omitempty"`
	CommandRating        CommandRating       `protobuf:"varint,3,opt,name=commandRating,proto3,enum=republique.CommandRating" json:"commandRating,omitempty"`
	Rank                 Rank                `protobuf:"varint,4,opt,name=rank,proto3,enum=republique.Rank" json:"rank,omitempty"`
	Subcommands          []*Command          `protobuf:"bytes,5,rep,name=subcommands,proto3" json:"subcommands,omitempty"`
	Units                []*Unit             `protobuf:"bytes,6,rep,name=units,proto3" json:"units,omitempty"`
	CommanderBonus       int32               `protobuf:"varint,7,opt,name=commanderBonus,proto3" json:"commanderBonus,omitempty"`
	Arm                  Arm                 `protobuf:"varint,8,opt,name=arm,proto3,enum=republique.Arm" json:"arm,omitempty"`
	Nationality          Nationality         `protobuf:"varint,9,opt,name=nationality,proto3,enum=republique.Nationality" json:"nationality,omitempty"`
	Grade                UnitGrade           `protobuf:"varint,10,opt,name=grade,proto3,enum=republique.UnitGrade" json:"grade,omitempty"`
	Drill                Drill               `protobuf:"varint,11,opt,name=drill,proto3,enum=republique.Drill" json:"drill,omitempty"`
	Notes                string              `protobuf:"bytes,12,opt,name=notes,proto3" json:"notes,omitempty"`
	Arrival              *Arrival            `protobuf:"bytes,13,opt,name=arrival,proto3" json:"arrival,omitempty"`
	GameState            *CommandGameState   `protobuf:"bytes,14,opt,name=gameState,proto3" json:"gameState,omitempty"`
	History              []*CommandGameState `protobuf:"bytes,15,rep,name=history,proto3" json:"history,omitempty"`
	Reserve              bool                `protobuf:"varint,16,opt,name=reserve,proto3" json:"reserve,omitempty"`
	Id                   int32               `protobuf:"varint,17,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

Command details that are static for a game

func (*Command) AddAction

func (c *Command) AddAction(s string, done bool, t ActionType)

AddAction adds an action to a command

func (*Command) AddToObjective

func (c *Command) AddToObjective(x, y int32) []*Grid

AddToObjective adds a grid to the path for the command order

func (*Command) BattleFormation

func (c *Command) BattleFormation() Formation

BattleFormation returns the default battle formation for a command, based on its drill rating

func (*Command) ClearActions

func (c *Command) ClearActions()

ClearActions clears the actions for a command

func (*Command) ClearOrder

func (c *Command) ClearOrder()

ClearOrder clears the order and objective path for a command

func (*Command) Descriptor

func (*Command) Descriptor() ([]byte, []int)

func (*Command) GetArm

func (m *Command) GetArm() Arm

func (*Command) GetArrival

func (m *Command) GetArrival() *Arrival

func (*Command) GetCommandRating

func (m *Command) GetCommandRating() CommandRating

func (*Command) GetCommandStrength

func (c *Command) GetCommandStrength() CommandStrength

GetCommandStrength gets the strength of a command

func (*Command) GetCommandStrengthLabel

func (c *Command) GetCommandStrengthLabel() string

GetCommandStrengthLabel gets the strength of a command as a string

func (*Command) GetCommanderBonus

func (m *Command) GetCommanderBonus() int32

func (*Command) GetCommanderName

func (m *Command) GetCommanderName() string

func (*Command) GetDrill

func (m *Command) GetDrill() Drill

func (*Command) GetGameState

func (m *Command) GetGameState() *CommandGameState

func (*Command) GetGrade

func (m *Command) GetGrade() UnitGrade

func (*Command) GetHistory

func (m *Command) GetHistory() []*CommandGameState

func (*Command) GetId

func (m *Command) GetId() int32

func (*Command) GetName

func (m *Command) GetName() string

func (*Command) GetNationality

func (m *Command) GetNationality() Nationality

func (*Command) GetNotes

func (m *Command) GetNotes() string

func (*Command) GetRank

func (m *Command) GetRank() Rank

func (*Command) GetReserve

func (m *Command) GetReserve() bool

func (*Command) GetSubcommands

func (m *Command) GetSubcommands() []*Command

func (*Command) GetUnits

func (m *Command) GetUnits() []*Unit

func (*Command) LabelString

func (c *Command) LabelString() string

LabelString returns a formatted string for rendering the whole command in the GUI app

func (*Command) LongDescription

func (c *Command) LongDescription() string

LongDescription returns a long description string for the command

func (*Command) ProtoMessage

func (*Command) ProtoMessage()

func (*Command) Reset

func (m *Command) Reset()

func (*Command) SetAction

func (c *Command) SetAction(s string, done bool)

SetAction sets the action for a command

func (*Command) SetObjective

func (c *Command) SetObjective(x, y int32) []*Grid

SetObjective sets the grid path

func (*Command) SetOrder

func (c *Command) SetOrder(order Order) bool

SetOrder sets the order for the command, returns true if changed

func (*Command) String

func (m *Command) String() string

func (*Command) XXX_DiscardUnknown

func (m *Command) XXX_DiscardUnknown()

func (*Command) XXX_Marshal

func (m *Command) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Command) XXX_Merge

func (m *Command) XXX_Merge(src proto.Message)

func (*Command) XXX_Size

func (m *Command) XXX_Size() int

func (*Command) XXX_Unmarshal

func (m *Command) XXX_Unmarshal(b []byte) error

type CommandGameState

type CommandGameState struct {
	Turn                 int32                `protobuf:"varint,1,opt,name=turn,proto3" json:"turn,omitempty"`
	Grid                 *Grid                `protobuf:"bytes,2,opt,name=grid,proto3" json:"grid,omitempty"`
	Position             BattlefieldPosition  `protobuf:"varint,3,opt,name=position,proto3,enum=republique.BattlefieldPosition" json:"position,omitempty"`
	Formation            Formation            `protobuf:"varint,4,opt,name=formation,proto3,enum=republique.Formation" json:"formation,omitempty"`
	PanicState           int32                `protobuf:"varint,5,opt,name=panicState,proto3" json:"panicState,omitempty"`
	Injured              bool                 `protobuf:"varint,6,opt,name=injured,proto3" json:"injured,omitempty"`
	ObjectiveName        string               `protobuf:"bytes,7,opt,name=objectiveName,proto3" json:"objectiveName,omitempty"`
	Orders               Order                `protobuf:"varint,8,opt,name=orders,proto3,enum=republique.Order" json:"orders,omitempty"`
	Objective            []*Grid              `protobuf:"bytes,9,rep,name=objective,proto3" json:"objective,omitempty"`
	AttachedTo           string               `protobuf:"bytes,10,opt,name=attachedTo,proto3" json:"attachedTo,omitempty"`
	Timestamp            *timestamp.Timestamp `protobuf:"bytes,11,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Actions              []*Action            `protobuf:"bytes,12,rep,name=actions,proto3" json:"actions,omitempty"`
	Can                  *UnitAction          `protobuf:"bytes,13,opt,name=can,proto3" json:"can,omitempty"`
	Has                  *UnitAction          `protobuf:"bytes,14,opt,name=has,proto3" json:"has,omitempty"`
	Must                 *UnitAction          `protobuf:"bytes,15,opt,name=must,proto3" json:"must,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

Command details that can change from turn to turn

func (*CommandGameState) Descriptor

func (*CommandGameState) Descriptor() ([]byte, []int)

func (*CommandGameState) GetActions

func (m *CommandGameState) GetActions() []*Action

func (*CommandGameState) GetAttachedTo

func (m *CommandGameState) GetAttachedTo() string

func (*CommandGameState) GetCan

func (m *CommandGameState) GetCan() *UnitAction

func (*CommandGameState) GetFormation

func (m *CommandGameState) GetFormation() Formation

func (*CommandGameState) GetGrid

func (m *CommandGameState) GetGrid() *Grid

func (*CommandGameState) GetHas

func (m *CommandGameState) GetHas() *UnitAction

func (*CommandGameState) GetInjured

func (m *CommandGameState) GetInjured() bool

func (*CommandGameState) GetMust

func (m *CommandGameState) GetMust() *UnitAction

func (*CommandGameState) GetObjective

func (m *CommandGameState) GetObjective() []*Grid

func (*CommandGameState) GetObjectiveName

func (m *CommandGameState) GetObjectiveName() string

func (*CommandGameState) GetOrders

func (m *CommandGameState) GetOrders() Order

func (*CommandGameState) GetPanicState

func (m *CommandGameState) GetPanicState() int32

func (*CommandGameState) GetPosition

func (m *CommandGameState) GetPosition() BattlefieldPosition

func (*CommandGameState) GetTimestamp

func (m *CommandGameState) GetTimestamp() *timestamp.Timestamp

func (*CommandGameState) GetTurn

func (m *CommandGameState) GetTurn() int32

func (*CommandGameState) ProtoMessage

func (*CommandGameState) ProtoMessage()

func (*CommandGameState) Reset

func (m *CommandGameState) Reset()

func (*CommandGameState) String

func (m *CommandGameState) String() string

func (*CommandGameState) XXX_DiscardUnknown

func (m *CommandGameState) XXX_DiscardUnknown()

func (*CommandGameState) XXX_Marshal

func (m *CommandGameState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CommandGameState) XXX_Merge

func (m *CommandGameState) XXX_Merge(src proto.Message)

func (*CommandGameState) XXX_Size

func (m *CommandGameState) XXX_Size() int

func (*CommandGameState) XXX_Unmarshal

func (m *CommandGameState) XXX_Unmarshal(b []byte) error

type CommandRating

type CommandRating int32
const (
	CommandRating_USELESS    CommandRating = 0
	CommandRating_CUMBERSOME CommandRating = 1
	CommandRating_FUNCTIONAL CommandRating = 2
	CommandRating_EFFICIENT  CommandRating = 3
)

func (CommandRating) EnumDescriptor

func (CommandRating) EnumDescriptor() ([]byte, []int)

func (CommandRating) String

func (x CommandRating) String() string

type CommandStrength

type CommandStrength struct {
	Infantry int32
	Cavalry  int32
	Guns     int32
}

CommandStrength is the number of troops in a command

type Drill

type Drill int32
const (
	Drill_LINEAR Drill = 0
	Drill_MASSED Drill = 1
	Drill_RAPID  Drill = 2
)

func (Drill) EnumDescriptor

func (Drill) EnumDescriptor() ([]byte, []int)

func (Drill) String

func (x Drill) String() string

type EmptyMessage

type EmptyMessage struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*EmptyMessage) Descriptor

func (*EmptyMessage) Descriptor() ([]byte, []int)

func (*EmptyMessage) ProtoMessage

func (*EmptyMessage) ProtoMessage()

func (*EmptyMessage) Reset

func (m *EmptyMessage) Reset()

func (*EmptyMessage) String

func (m *EmptyMessage) String() string

func (*EmptyMessage) XXX_DiscardUnknown

func (m *EmptyMessage) XXX_DiscardUnknown()

func (*EmptyMessage) XXX_Marshal

func (m *EmptyMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EmptyMessage) XXX_Merge

func (m *EmptyMessage) XXX_Merge(src proto.Message)

func (*EmptyMessage) XXX_Size

func (m *EmptyMessage) XXX_Size() int

func (*EmptyMessage) XXX_Unmarshal

func (m *EmptyMessage) XXX_Unmarshal(b []byte) error

type Formation

type Formation int32
const (
	Formation_RESERVE          Formation = 0
	Formation_MARCH_COLUMN     Formation = 1
	Formation_ATTACK_COLUMN    Formation = 2
	Formation_CLOSED_COLUMN    Formation = 3
	Formation_LINE             Formation = 4
	Formation_ECHELON          Formation = 5
	Formation_SUPPORTING_LINES Formation = 6
	Formation_DEBANDE          Formation = 7
	Formation_FORTIFIED        Formation = 8
	Formation_COLUMN           Formation = 9
	Formation_DOUBLE_LINE      Formation = 10
)

func (Formation) EnumDescriptor

func (Formation) EnumDescriptor() ([]byte, []int)

func (Formation) String

func (x Formation) String() string

type Game

type Game struct {
	Scenario             *Scenario            `protobuf:"bytes,1,opt,name=scenario,proto3" json:"scenario,omitempty"`
	TurnNumber           int32                `protobuf:"varint,2,opt,name=turnNumber,proto3" json:"turnNumber,omitempty"`
	TableX               int32                `protobuf:"varint,3,opt,name=tableX,proto3" json:"tableX,omitempty"`
	TableY               int32                `protobuf:"varint,4,opt,name=tableY,proto3" json:"tableY,omitempty"`
	GameTime             *timestamp.Timestamp `protobuf:"bytes,5,opt,name=gameTime,proto3" json:"gameTime,omitempty"`
	AdminAccess          string               `protobuf:"bytes,6,opt,name=adminAccess,proto3" json:"adminAccess,omitempty"`
	Name                 string               `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"`
	Phase                Phase                `protobuf:"varint,8,opt,name=phase,proto3,enum=republique.Phase" json:"phase,omitempty"`
	TableLayout          string               `protobuf:"bytes,9,opt,name=tableLayout,proto3" json:"tableLayout,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Game) Descriptor

func (*Game) Descriptor() ([]byte, []int)

func (*Game) GenerateIDs

func (g *Game) GenerateIDs()

GenerateIDs loops through all the commanders and units in a game and stamps unique sequential IDs on each unit. This should only be used after compilation.

func (*Game) GetAdminAccess

func (m *Game) GetAdminAccess() string

func (*Game) GetGameTime

func (m *Game) GetGameTime() *timestamp.Timestamp

func (*Game) GetName

func (m *Game) GetName() string

func (*Game) GetPhase

func (m *Game) GetPhase() Phase

func (*Game) GetScenario

func (m *Game) GetScenario() *Scenario

func (*Game) GetTableLayout

func (m *Game) GetTableLayout() string

func (*Game) GetTableX

func (m *Game) GetTableX() int32

func (*Game) GetTableY

func (m *Game) GetTableY() int32

func (*Game) GetTeam

func (g *Game) GetTeam(p *Player) *Team

GetTeam returns the Team that the given player belongs to

func (*Game) GetTurnNumber

func (m *Game) GetTurnNumber() int32

func (*Game) GetUnitCommander

func (g *Game) GetUnitCommander(id int32) *Command

GetUnitCommander returns the command in charge of the given unit

func (*Game) InitGameState

func (g *Game) InitGameState()

InitGameState will loop through the commanders and units in a game and set the GameState to defaults based upon the arrival data. This is only intended to be run on loading a game in the game server. It will return with no changes if the game has already started.

func (*Game) ProtoMessage

func (*Game) ProtoMessage()

func (*Game) Reset

func (m *Game) Reset()

func (*Game) String

func (m *Game) String() string

func (*Game) XXX_DiscardUnknown

func (m *Game) XXX_DiscardUnknown()

func (*Game) XXX_Marshal

func (m *Game) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Game) XXX_Merge

func (m *Game) XXX_Merge(src proto.Message)

func (*Game) XXX_Size

func (m *Game) XXX_Size() int

func (*Game) XXX_Unmarshal

func (m *Game) XXX_Unmarshal(b []byte) error

type GameServiceClient

type GameServiceClient interface {
	Version(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*StringMessage, error)
	Login(ctx context.Context, in *LoginMessage, opts ...grpc.CallOption) (*LoginResponse, error)
	GameTime(ctx context.Context, in *TokenMessage, opts ...grpc.CallOption) (*GameTimeResponse, error)
	GetUnits(ctx context.Context, in *TokenMessage, opts ...grpc.CallOption) (*Units, error)
	GetEnemy(ctx context.Context, in *TokenMessage, opts ...grpc.CallOption) (*Units, error)
	GetMap(ctx context.Context, in *TokenMessage, opts ...grpc.CallOption) (*MapData, error)
}

GameServiceClient is the client API for GameService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewGameServiceClient

func NewGameServiceClient(cc *grpc.ClientConn) GameServiceClient

type GameServiceServer

GameServiceServer is the server API for GameService service.

type GameTimeResponse

type GameTimeResponse struct {
	Phase                Phase                `protobuf:"varint,1,opt,name=phase,proto3,enum=republique.Phase" json:"phase,omitempty"`
	GameTime             *timestamp.Timestamp `protobuf:"bytes,2,opt,name=gameTime,proto3" json:"gameTime,omitempty"`
	StopWatch            int64                `protobuf:"varint,3,opt,name=stopWatch,proto3" json:"stopWatch,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*GameTimeResponse) Descriptor

func (*GameTimeResponse) Descriptor() ([]byte, []int)

func (*GameTimeResponse) GetGameTime

func (m *GameTimeResponse) GetGameTime() *timestamp.Timestamp

func (*GameTimeResponse) GetPhase

func (m *GameTimeResponse) GetPhase() Phase

func (*GameTimeResponse) GetStopWatch

func (m *GameTimeResponse) GetStopWatch() int64

func (*GameTimeResponse) ProtoMessage

func (*GameTimeResponse) ProtoMessage()

func (*GameTimeResponse) Reset

func (m *GameTimeResponse) Reset()

func (*GameTimeResponse) String

func (m *GameTimeResponse) String() string

func (*GameTimeResponse) XXX_DiscardUnknown

func (m *GameTimeResponse) XXX_DiscardUnknown()

func (*GameTimeResponse) XXX_Marshal

func (m *GameTimeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GameTimeResponse) XXX_Merge

func (m *GameTimeResponse) XXX_Merge(src proto.Message)

func (*GameTimeResponse) XXX_Size

func (m *GameTimeResponse) XXX_Size() int

func (*GameTimeResponse) XXX_Unmarshal

func (m *GameTimeResponse) XXX_Unmarshal(b []byte) error

type Grid

type Grid struct {
	X                    int32    `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"`
	Y                    int32    `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"`
	Cover                bool     `protobuf:"varint,3,opt,name=cover,proto3" json:"cover,omitempty"`
	Woods                bool     `protobuf:"varint,4,opt,name=woods,proto3" json:"woods,omitempty"`
	Bua                  bool     `protobuf:"varint,5,opt,name=bua,proto3" json:"bua,omitempty"`
	Fort                 bool     `protobuf:"varint,6,opt,name=fort,proto3" json:"fort,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

////////////////////////////////////////////////////////////////////////////////////////////////////////// Types

func (*Grid) Descriptor

func (*Grid) Descriptor() ([]byte, []int)

func (*Grid) GetBua

func (m *Grid) GetBua() bool

func (*Grid) GetCover

func (m *Grid) GetCover() bool

func (*Grid) GetFort

func (m *Grid) GetFort() bool

func (*Grid) GetWoods

func (m *Grid) GetWoods() bool

func (*Grid) GetX

func (m *Grid) GetX() int32

func (*Grid) GetY

func (m *Grid) GetY() int32

func (*Grid) ProtoMessage

func (*Grid) ProtoMessage()

func (*Grid) Reset

func (m *Grid) Reset()

func (*Grid) String

func (m *Grid) String() string

func (*Grid) XXX_DiscardUnknown

func (m *Grid) XXX_DiscardUnknown()

func (*Grid) XXX_Marshal

func (m *Grid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Grid) XXX_Merge

func (m *Grid) XXX_Merge(src proto.Message)

func (*Grid) XXX_Size

func (m *Grid) XXX_Size() int

func (*Grid) XXX_Unmarshal

func (m *Grid) XXX_Unmarshal(b []byte) error

type LoginMessage

type LoginMessage struct {
	Hash                 []byte   `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	TeamCode             string   `protobuf:"bytes,2,opt,name=teamCode,proto3" json:"teamCode,omitempty"`
	PlayerCode           string   `protobuf:"bytes,3,opt,name=playerCode,proto3" json:"playerCode,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LoginMessage) Descriptor

func (*LoginMessage) Descriptor() ([]byte, []int)

func (*LoginMessage) GetHash

func (m *LoginMessage) GetHash() []byte

func (*LoginMessage) GetPlayerCode

func (m *LoginMessage) GetPlayerCode() string

func (*LoginMessage) GetTeamCode

func (m *LoginMessage) GetTeamCode() string

func (*LoginMessage) ProtoMessage

func (*LoginMessage) ProtoMessage()

func (*LoginMessage) Reset

func (m *LoginMessage) Reset()

func (*LoginMessage) String

func (m *LoginMessage) String() string

func (*LoginMessage) XXX_DiscardUnknown

func (m *LoginMessage) XXX_DiscardUnknown()

func (*LoginMessage) XXX_Marshal

func (m *LoginMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LoginMessage) XXX_Merge

func (m *LoginMessage) XXX_Merge(src proto.Message)

func (*LoginMessage) XXX_Size

func (m *LoginMessage) XXX_Size() int

func (*LoginMessage) XXX_Unmarshal

func (m *LoginMessage) XXX_Unmarshal(b []byte) error

type LoginResponse

type LoginResponse struct {
	Welcome              string               `protobuf:"bytes,2,opt,name=welcome,proto3" json:"welcome,omitempty"`
	Commanders           []string             `protobuf:"bytes,3,rep,name=commanders,proto3" json:"commanders,omitempty"`
	TeamName             string               `protobuf:"bytes,4,opt,name=teamName,proto3" json:"teamName,omitempty"`
	Briefing             string               `protobuf:"bytes,5,opt,name=briefing,proto3" json:"briefing,omitempty"`
	GameName             string               `protobuf:"bytes,6,opt,name=gameName,proto3" json:"gameName,omitempty"`
	Token                *Token               `protobuf:"bytes,7,opt,name=token,proto3" json:"token,omitempty"`
	GameTime             *timestamp.Timestamp `protobuf:"bytes,8,opt,name=gameTime,proto3" json:"gameTime,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*LoginResponse) Descriptor

func (*LoginResponse) Descriptor() ([]byte, []int)

func (*LoginResponse) GetBriefing

func (m *LoginResponse) GetBriefing() string

func (*LoginResponse) GetCommanders

func (m *LoginResponse) GetCommanders() []string

func (*LoginResponse) GetGameName

func (m *LoginResponse) GetGameName() string

func (*LoginResponse) GetGameTime

func (m *LoginResponse) GetGameTime() *timestamp.Timestamp

func (*LoginResponse) GetTeamName

func (m *LoginResponse) GetTeamName() string

func (*LoginResponse) GetToken

func (m *LoginResponse) GetToken() *Token

func (*LoginResponse) GetWelcome

func (m *LoginResponse) GetWelcome() string

func (*LoginResponse) ProtoMessage

func (*LoginResponse) ProtoMessage()

func (*LoginResponse) Reset

func (m *LoginResponse) Reset()

func (*LoginResponse) String

func (m *LoginResponse) String() string

func (*LoginResponse) XXX_DiscardUnknown

func (m *LoginResponse) XXX_DiscardUnknown()

func (*LoginResponse) XXX_Marshal

func (m *LoginResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LoginResponse) XXX_Merge

func (m *LoginResponse) XXX_Merge(src proto.Message)

func (*LoginResponse) XXX_Size

func (m *LoginResponse) XXX_Size() int

func (*LoginResponse) XXX_Unmarshal

func (m *LoginResponse) XXX_Unmarshal(b []byte) error

type MapData

type MapData struct {
	X                    int32    `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"`
	Y                    int32    `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"`
	Data                 string   `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	Side                 MapSide  `protobuf:"varint,4,opt,name=side,proto3,enum=republique.MapSide" json:"side,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*MapData) Descriptor

func (*MapData) Descriptor() ([]byte, []int)

func (*MapData) GetData

func (m *MapData) GetData() string

func (*MapData) GetSide

func (m *MapData) GetSide() MapSide

func (*MapData) GetValue

func (m *MapData) GetValue(x, y int32) byte

GetValue gets the grid contents at x,y

func (*MapData) GetWaypoints

func (m *MapData) GetWaypoints(command *Command) []Waypoint

GetWaypoints gets a slice of waypoints for a given command on this map

func (*MapData) GetX

func (m *MapData) GetX() int32

func (*MapData) GetY

func (m *MapData) GetY() int32

func (*MapData) ProtoMessage

func (*MapData) ProtoMessage()

func (*MapData) Reset

func (m *MapData) Reset()

func (*MapData) String

func (m *MapData) String() string

func (*MapData) XXX_DiscardUnknown

func (m *MapData) XXX_DiscardUnknown()

func (*MapData) XXX_Marshal

func (m *MapData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MapData) XXX_Merge

func (m *MapData) XXX_Merge(src proto.Message)

func (*MapData) XXX_Size

func (m *MapData) XXX_Size() int

func (*MapData) XXX_Unmarshal

func (m *MapData) XXX_Unmarshal(b []byte) error

type MapSide

type MapSide int32
const (
	MapSide_FRONT       MapSide = 0
	MapSide_LEFT_FLANK  MapSide = 1
	MapSide_RIGHT_FLANK MapSide = 2
	MapSide_TOP         MapSide = 3
)

func (MapSide) EnumDescriptor

func (MapSide) EnumDescriptor() ([]byte, []int)

func (MapSide) String

func (x MapSide) String() string

type MoraleState

type MoraleState int32
const (
	MoraleState_RESTING     MoraleState = 0
	MoraleState_GOOD        MoraleState = 1
	MoraleState_UNFORMED    MoraleState = 2
	MoraleState_RATTLED     MoraleState = 3
	MoraleState_SHAKEN      MoraleState = 4
	MoraleState_DEMORALISED MoraleState = 5
)

func (MoraleState) EnumDescriptor

func (MoraleState) EnumDescriptor() ([]byte, []int)

func (MoraleState) String

func (x MoraleState) String() string

type Nationality

type Nationality int32
const (
	Nationality_ANY_NATION   Nationality = 0
	Nationality_FRENCH       Nationality = 1
	Nationality_BRITISH      Nationality = 2
	Nationality_RUSSIAN      Nationality = 3
	Nationality_PRUSSIAN     Nationality = 4
	Nationality_SPANISH      Nationality = 6
	Nationality_OTTOMAN      Nationality = 7
	Nationality_PERSIAN      Nationality = 8
	Nationality_AUSTRIAN     Nationality = 9
	Nationality_AMERICAN     Nationality = 10
	Nationality_INDIAN       Nationality = 11
	Nationality_ITALIAN      Nationality = 12
	Nationality_BAVARIAN     Nationality = 13
	Nationality_DUTCH        Nationality = 14
	Nationality_BELGIAN      Nationality = 15
	Nationality_NASSAU       Nationality = 16
	Nationality_SWISS        Nationality = 17
	Nationality_PAPAL_STATES Nationality = 18
	Nationality_AFRICAN      Nationality = 19
	Nationality_NATIVE       Nationality = 20
	Nationality_COLONIAL     Nationality = 21
	Nationality_SWEDEN       Nationality = 22
)

func (Nationality) EnumDescriptor

func (Nationality) EnumDescriptor() ([]byte, []int)

func (Nationality) String

func (x Nationality) String() string

type Order

type Order int32
const (
	Order_NO_ORDERS Order = 0
	Order_MARCH     Order = 1
	Order_MOVE      Order = 2
	Order_DEFEND    Order = 3
	Order_WITHDRAW  Order = 4
	Order_ATTACK    Order = 5
	Order_RALLY     Order = 6
	Order_ENGAGE    Order = 7
	Order_PURSUIT   Order = 8
	Order_ADVANCE   Order = 9
	Order_CHARGE    Order = 10
	Order_FIRE      Order = 11
	Order_RESTAGE   Order = 12
)

func (Order) EnumDescriptor

func (Order) EnumDescriptor() ([]byte, []int)

func (Order) String

func (x Order) String() string

type Phase

type Phase int32
const (
	Phase_PREGAME   Phase = 0
	Phase_LEADERS   Phase = 1
	Phase_MOVEMENT1 Phase = 2
	Phase_FIRING1   Phase = 3
	Phase_ASSAULT1  Phase = 4
	Phase_PANIC1    Phase = 5
	Phase_MOVEMENT2 Phase = 6
	Phase_FIRING2   Phase = 7
	Phase_ASSAULT2  Phase = 8
	Phase_PANIC2    Phase = 9
)

func (Phase) EnumDescriptor

func (Phase) EnumDescriptor() ([]byte, []int)

func (Phase) String

func (x Phase) String() string

type Player

type Player struct {
	AccessCode           string   `protobuf:"bytes,1,opt,name=accessCode,proto3" json:"accessCode,omitempty"`
	Commanders           []string `protobuf:"bytes,3,rep,name=commanders,proto3" json:"commanders,omitempty"`
	Points               int32    `protobuf:"varint,4,opt,name=points,proto3" json:"points,omitempty"`
	Token                *Token   `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

TODO - add some public key enc / tokens to this

func (*Player) Descriptor

func (*Player) Descriptor() ([]byte, []int)

func (*Player) GetAccessCode

func (m *Player) GetAccessCode() string

func (*Player) GetCommanders

func (m *Player) GetCommanders() []string

func (*Player) GetPoints

func (m *Player) GetPoints() int32

func (*Player) GetToken

func (m *Player) GetToken() *Token

func (*Player) ProtoMessage

func (*Player) ProtoMessage()

func (*Player) Reset

func (m *Player) Reset()

func (*Player) String

func (m *Player) String() string

func (*Player) XXX_DiscardUnknown

func (m *Player) XXX_DiscardUnknown()

func (*Player) XXX_Marshal

func (m *Player) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Player) XXX_Merge

func (m *Player) XXX_Merge(src proto.Message)

func (*Player) XXX_Size

func (m *Player) XXX_Size() int

func (*Player) XXX_Unmarshal

func (m *Player) XXX_Unmarshal(b []byte) error

type Rank

type Rank int32
const (
	Rank_BATTALION       Rank = 0
	Rank_BRIGADE         Rank = 1
	Rank_DIVISION        Rank = 2
	Rank_CORPS           Rank = 3
	Rank_WING            Rank = 4
	Rank_ARMY            Rank = 5
	Rank_NATIONAL_LEADER Rank = 6
	Rank_ARTILLERY_DIV   Rank = 7
	Rank_CAVALRY_BDE     Rank = 8
	Rank_CAVALRY_DIV     Rank = 9
	Rank_BATTERY         Rank = 10
	Rank_GUN_PARK        Rank = 11
)

func (Rank) EnumDescriptor

func (Rank) EnumDescriptor() ([]byte, []int)

func (Rank) String

func (x Rank) String() string

type Scenario

type Scenario struct {
	StartTime            *timestamp.Timestamp `protobuf:"bytes,1,opt,name=startTime,proto3" json:"startTime,omitempty"`
	Teams                map[string]*Team     `` /* 151-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Scenario) Descriptor

func (*Scenario) Descriptor() ([]byte, []int)

func (*Scenario) GetStartTime

func (m *Scenario) GetStartTime() *timestamp.Timestamp

func (*Scenario) GetTeams

func (m *Scenario) GetTeams() map[string]*Team

func (*Scenario) ProtoMessage

func (*Scenario) ProtoMessage()

func (*Scenario) Reset

func (m *Scenario) Reset()

func (*Scenario) String

func (m *Scenario) String() string

func (*Scenario) XXX_DiscardUnknown

func (m *Scenario) XXX_DiscardUnknown()

func (*Scenario) XXX_Marshal

func (m *Scenario) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Scenario) XXX_Merge

func (m *Scenario) XXX_Merge(src proto.Message)

func (*Scenario) XXX_Size

func (m *Scenario) XXX_Size() int

func (*Scenario) XXX_Unmarshal

func (m *Scenario) XXX_Unmarshal(b []byte) error

type SkirmishRating

type SkirmishRating int32
const (
	SkirmishRating_POOR       SkirmishRating = 0
	SkirmishRating_ADEQUATE   SkirmishRating = 1
	SkirmishRating_CRACK_SHOT SkirmishRating = 2
	SkirmishRating_EXCELLENT  SkirmishRating = 3
)

func (SkirmishRating) Decrement

func (x SkirmishRating) Decrement() SkirmishRating

Decrement drops the skirmish rating by 1 level, safely

func (SkirmishRating) EnumDescriptor

func (SkirmishRating) EnumDescriptor() ([]byte, []int)

func (SkirmishRating) Increment

func (x SkirmishRating) Increment() SkirmishRating

Increment raises the skirmish rating by 1 level, safely

func (SkirmishRating) String

func (x SkirmishRating) String() string

type StringMessage

type StringMessage struct {
	Value                string   `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

////////////////////////////////////////////////////////////////////////////////////////////////////////// Messages

func (*StringMessage) Descriptor

func (*StringMessage) Descriptor() ([]byte, []int)

func (*StringMessage) GetValue

func (m *StringMessage) GetValue() string

func (*StringMessage) ProtoMessage

func (*StringMessage) ProtoMessage()

func (*StringMessage) Reset

func (m *StringMessage) Reset()

func (*StringMessage) String

func (m *StringMessage) String() string

func (*StringMessage) XXX_DiscardUnknown

func (m *StringMessage) XXX_DiscardUnknown()

func (*StringMessage) XXX_Marshal

func (m *StringMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StringMessage) XXX_Merge

func (m *StringMessage) XXX_Merge(src proto.Message)

func (*StringMessage) XXX_Size

func (m *StringMessage) XXX_Size() int

func (*StringMessage) XXX_Unmarshal

func (m *StringMessage) XXX_Unmarshal(b []byte) error

type Team

type Team struct {
	Name                 string     `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Briefing             string     `protobuf:"bytes,2,opt,name=briefing,proto3" json:"briefing,omitempty"`
	Commands             []*Command `protobuf:"bytes,3,rep,name=commands,proto3" json:"commands,omitempty"`
	AccessCode           string     `protobuf:"bytes,4,opt,name=accessCode,proto3" json:"accessCode,omitempty"`
	Players              []*Player  `protobuf:"bytes,5,rep,name=players,proto3" json:"players,omitempty"`
	GameName             string     `protobuf:"bytes,6,opt,name=gameName,proto3" json:"gameName,omitempty"`
	Side                 MapSide    `protobuf:"varint,7,opt,name=side,proto3,enum=republique.MapSide" json:"side,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*Team) Descriptor

func (*Team) Descriptor() ([]byte, []int)

func (*Team) GetAccessCode

func (m *Team) GetAccessCode() string

func (*Team) GetBriefing

func (m *Team) GetBriefing() string

func (*Team) GetCommandByCommanderName

func (t *Team) GetCommandByCommanderName(name string) *Command

GetCommandByCommanderName gets the matching command by the name of the commander

func (*Team) GetCommandByID

func (t *Team) GetCommandByID(id int32) *Command

GetCommandByID gets the matching command by the ID of the unit

func (*Team) GetCommandByName

func (t *Team) GetCommandByName(name string) *Command

GetCommandByName gets the matching command by the name of the unit

func (*Team) GetCommands

func (m *Team) GetCommands() []*Command

func (*Team) GetGameName

func (m *Team) GetGameName() string

func (*Team) GetName

func (m *Team) GetName() string

func (*Team) GetPlayers

func (m *Team) GetPlayers() []*Player

func (*Team) GetSide

func (m *Team) GetSide() MapSide

func (*Team) ProtoMessage

func (*Team) ProtoMessage()

func (*Team) Reset

func (m *Team) Reset()

func (*Team) String

func (m *Team) String() string

func (*Team) XXX_DiscardUnknown

func (m *Team) XXX_DiscardUnknown()

func (*Team) XXX_Marshal

func (m *Team) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Team) XXX_Merge

func (m *Team) XXX_Merge(src proto.Message)

func (*Team) XXX_Size

func (m *Team) XXX_Size() int

func (*Team) XXX_Unmarshal

func (m *Team) XXX_Unmarshal(b []byte) error

type Token

type Token struct {
	Id                   string               `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Expires              *timestamp.Timestamp `protobuf:"bytes,2,opt,name=expires,proto3" json:"expires,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func NewToken

func NewToken() *Token

NewToken returns a new token with a randomised UUID and a 24hr expiry period

func (*Token) Descriptor

func (*Token) Descriptor() ([]byte, []int)

func (*Token) GetExpires

func (m *Token) GetExpires() *timestamp.Timestamp

func (*Token) GetId

func (m *Token) GetId() string

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) Reset

func (m *Token) Reset()

func (*Token) String

func (m *Token) String() string

func (*Token) XXX_DiscardUnknown

func (m *Token) XXX_DiscardUnknown()

func (*Token) XXX_Marshal

func (m *Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Token) XXX_Merge

func (m *Token) XXX_Merge(src proto.Message)

func (*Token) XXX_Size

func (m *Token) XXX_Size() int

func (*Token) XXX_Unmarshal

func (m *Token) XXX_Unmarshal(b []byte) error

type TokenMessage

type TokenMessage struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TokenMessage) Descriptor

func (*TokenMessage) Descriptor() ([]byte, []int)

func (*TokenMessage) GetId

func (m *TokenMessage) GetId() string

func (*TokenMessage) ProtoMessage

func (*TokenMessage) ProtoMessage()

func (*TokenMessage) Reset

func (m *TokenMessage) Reset()

func (*TokenMessage) String

func (m *TokenMessage) String() string

func (*TokenMessage) XXX_DiscardUnknown

func (m *TokenMessage) XXX_DiscardUnknown()

func (*TokenMessage) XXX_Marshal

func (m *TokenMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TokenMessage) XXX_Merge

func (m *TokenMessage) XXX_Merge(src proto.Message)

func (*TokenMessage) XXX_Size

func (m *TokenMessage) XXX_Size() int

func (*TokenMessage) XXX_Unmarshal

func (m *TokenMessage) XXX_Unmarshal(b []byte) error

type UnimplementedGameServiceServer

type UnimplementedGameServiceServer struct {
}

UnimplementedGameServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedGameServiceServer) GameTime

func (*UnimplementedGameServiceServer) GetEnemy

func (*UnimplementedGameServiceServer) GetMap

func (*UnimplementedGameServiceServer) GetUnits

func (*UnimplementedGameServiceServer) Login

func (*UnimplementedGameServiceServer) Version

type Unit

type Unit struct {
	Name                 string           `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Arm                  Arm              `protobuf:"varint,2,opt,name=arm,proto3,enum=republique.Arm" json:"arm,omitempty"`
	UnitType             UnitType         `protobuf:"varint,3,opt,name=unitType,proto3,enum=republique.UnitType" json:"unitType,omitempty"`
	Strength             int32            `protobuf:"varint,4,opt,name=strength,proto3" json:"strength,omitempty"`
	Grade                UnitGrade        `protobuf:"varint,5,opt,name=grade,proto3,enum=republique.UnitGrade" json:"grade,omitempty"`
	SkirmishRating       SkirmishRating   `protobuf:"varint,6,opt,name=skirmishRating,proto3,enum=republique.SkirmishRating" json:"skirmishRating,omitempty"`
	SkirmisherMax        int32            `protobuf:"varint,7,opt,name=skirmisherMax,proto3" json:"skirmisherMax,omitempty"`
	Notes                string           `protobuf:"bytes,8,opt,name=notes,proto3" json:"notes,omitempty"`
	BnGuns               bool             `protobuf:"varint,9,opt,name=bnGuns,proto3" json:"bnGuns,omitempty"`
	Nationality          Nationality      `protobuf:"varint,10,opt,name=nationality,proto3,enum=republique.Nationality" json:"nationality,omitempty"`
	Drill                Drill            `protobuf:"varint,11,opt,name=drill,proto3,enum=republique.Drill" json:"drill,omitempty"`
	CommandReserve       bool             `protobuf:"varint,12,opt,name=commandReserve,proto3" json:"commandReserve,omitempty"`
	GameState            *UnitGameState   `protobuf:"bytes,13,opt,name=gameState,proto3" json:"gameState,omitempty"`
	History              []*UnitGameState `protobuf:"bytes,14,rep,name=history,proto3" json:"history,omitempty"`
	Id                   int32            `protobuf:"varint,15,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

Unit details that are static for a game

func (*Unit) BattleFormation

func (u *Unit) BattleFormation() Formation

BattleFormation returns the default battle formation for a unit, based on its drill

func (*Unit) Descriptor

func (*Unit) Descriptor() ([]byte, []int)

func (*Unit) GetArm

func (m *Unit) GetArm() Arm

func (*Unit) GetBnGuns

func (m *Unit) GetBnGuns() bool

func (*Unit) GetCommandReserve

func (m *Unit) GetCommandReserve() bool

func (*Unit) GetDrill

func (m *Unit) GetDrill() Drill

func (*Unit) GetGameState

func (m *Unit) GetGameState() *UnitGameState

func (*Unit) GetGrade

func (m *Unit) GetGrade() UnitGrade

func (*Unit) GetHistory

func (m *Unit) GetHistory() []*UnitGameState

func (*Unit) GetId

func (m *Unit) GetId() int32

func (*Unit) GetName

func (m *Unit) GetName() string

func (*Unit) GetNationality

func (m *Unit) GetNationality() Nationality

func (*Unit) GetNotes

func (m *Unit) GetNotes() string

func (*Unit) GetSKLabel

func (u *Unit) GetSKLabel() string

GetSKLabel returns a description of the unit skirmisher state

func (*Unit) GetSkirmishRating

func (m *Unit) GetSkirmishRating() SkirmishRating

func (*Unit) GetSkirmisherMax

func (m *Unit) GetSkirmisherMax() int32

func (*Unit) GetStrength

func (m *Unit) GetStrength() int32

func (*Unit) GetStrengthLabel

func (u *Unit) GetStrengthLabel(withSK bool) string

GetStrengthLabel returns a description of the unit strength

func (*Unit) GetUnitType

func (m *Unit) GetUnitType() UnitType

func (*Unit) LabelString

func (u *Unit) LabelString() string

LabelString returns a formatted string suitable for labelling the unit in the GUI

func (*Unit) ProtoMessage

func (*Unit) ProtoMessage()

func (*Unit) Reset

func (m *Unit) Reset()

func (*Unit) ShortLabel

func (u *Unit) ShortLabel() string

ShortLabel returns a formatted string suitable for labelling the unit in the GUI

func (*Unit) String

func (m *Unit) String() string

func (*Unit) XXX_DiscardUnknown

func (m *Unit) XXX_DiscardUnknown()

func (*Unit) XXX_Marshal

func (m *Unit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Unit) XXX_Merge

func (m *Unit) XXX_Merge(src proto.Message)

func (*Unit) XXX_Size

func (m *Unit) XXX_Size() int

func (*Unit) XXX_Unmarshal

func (m *Unit) XXX_Unmarshal(b []byte) error

type UnitAction

type UnitAction struct {
	GunFire              bool     `protobuf:"varint,1,opt,name=gunFire,proto3" json:"gunFire,omitempty"`
	GunLimber            bool     `protobuf:"varint,2,opt,name=gunLimber,proto3" json:"gunLimber,omitempty"`
	GunDeploy            bool     `protobuf:"varint,3,opt,name=gunDeploy,proto3" json:"gunDeploy,omitempty"`
	GunMove              bool     `protobuf:"varint,4,opt,name=gunMove,proto3" json:"gunMove,omitempty"`
	Move                 bool     `protobuf:"varint,5,opt,name=move,proto3" json:"move,omitempty"`
	Assault              bool     `protobuf:"varint,6,opt,name=assault,proto3" json:"assault,omitempty"`
	ChangeFormation      bool     `protobuf:"varint,7,opt,name=changeFormation,proto3" json:"changeFormation,omitempty"`
	SkDeploy             bool     `protobuf:"varint,8,opt,name=skDeploy,proto3" json:"skDeploy,omitempty"`
	SkRetire             bool     `protobuf:"varint,9,opt,name=skRetire,proto3" json:"skRetire,omitempty"`
	SkAttack             bool     `protobuf:"varint,10,opt,name=skAttack,proto3" json:"skAttack,omitempty"`
	Fallback             bool     `protobuf:"varint,11,opt,name=fallback,proto3" json:"fallback,omitempty"`
	Withdraw             bool     `protobuf:"varint,12,opt,name=withdraw,proto3" json:"withdraw,omitempty"`
	Rout                 bool     `protobuf:"varint,13,opt,name=rout,proto3" json:"rout,omitempty"`
	Rally                bool     `protobuf:"varint,14,opt,name=rally,proto3" json:"rally,omitempty"`
	Order                bool     `protobuf:"varint,15,opt,name=order,proto3" json:"order,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UnitAction) Descriptor

func (*UnitAction) Descriptor() ([]byte, []int)

func (*UnitAction) GetAssault

func (m *UnitAction) GetAssault() bool

func (*UnitAction) GetChangeFormation

func (m *UnitAction) GetChangeFormation() bool

func (*UnitAction) GetFallback

func (m *UnitAction) GetFallback() bool

func (*UnitAction) GetGunDeploy

func (m *UnitAction) GetGunDeploy() bool

func (*UnitAction) GetGunFire

func (m *UnitAction) GetGunFire() bool

func (*UnitAction) GetGunLimber

func (m *UnitAction) GetGunLimber() bool

func (*UnitAction) GetGunMove

func (m *UnitAction) GetGunMove() bool

func (*UnitAction) GetMove

func (m *UnitAction) GetMove() bool

func (*UnitAction) GetOrder

func (m *UnitAction) GetOrder() bool

func (*UnitAction) GetRally

func (m *UnitAction) GetRally() bool

func (*UnitAction) GetRout

func (m *UnitAction) GetRout() bool

func (*UnitAction) GetSkAttack

func (m *UnitAction) GetSkAttack() bool

func (*UnitAction) GetSkDeploy

func (m *UnitAction) GetSkDeploy() bool

func (*UnitAction) GetSkRetire

func (m *UnitAction) GetSkRetire() bool

func (*UnitAction) GetWithdraw

func (m *UnitAction) GetWithdraw() bool

func (*UnitAction) ProtoMessage

func (*UnitAction) ProtoMessage()

func (*UnitAction) Reset

func (m *UnitAction) Reset()

func (*UnitAction) String

func (m *UnitAction) String() string

func (*UnitAction) XXX_DiscardUnknown

func (m *UnitAction) XXX_DiscardUnknown()

func (*UnitAction) XXX_Marshal

func (m *UnitAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UnitAction) XXX_Merge

func (m *UnitAction) XXX_Merge(src proto.Message)

func (*UnitAction) XXX_Size

func (m *UnitAction) XXX_Size() int

func (*UnitAction) XXX_Unmarshal

func (m *UnitAction) XXX_Unmarshal(b []byte) error

type UnitGameState

type UnitGameState struct {
	Hits                 int32       `protobuf:"varint,1,opt,name=hits,proto3" json:"hits,omitempty"`
	SkirmishersDeployed  int32       `protobuf:"varint,2,opt,name=skirmishersDeployed,proto3" json:"skirmishersDeployed,omitempty"`
	Formation            Formation   `protobuf:"varint,3,opt,name=formation,proto3,enum=republique.Formation" json:"formation,omitempty"`
	MoraleState          MoraleState `protobuf:"varint,4,opt,name=moraleState,proto3,enum=republique.MoraleState" json:"moraleState,omitempty"`
	GunsDamaged          bool        `protobuf:"varint,5,opt,name=gunsDamaged,proto3" json:"gunsDamaged,omitempty"`
	GunsDeployed         bool        `protobuf:"varint,6,opt,name=gunsDeployed,proto3" json:"gunsDeployed,omitempty"`
	GunsStocked          bool        `protobuf:"varint,7,opt,name=gunsStocked,proto3" json:"gunsStocked,omitempty"`
	Hidden               bool        `protobuf:"varint,8,opt,name=hidden,proto3" json:"hidden,omitempty"`
	HasFired             bool        `protobuf:"varint,9,opt,name=hasFired,proto3" json:"hasFired,omitempty"`
	Fatigue              int32       `protobuf:"varint,10,opt,name=fatigue,proto3" json:"fatigue,omitempty"`
	LowAmmo              bool        `protobuf:"varint,11,opt,name=lowAmmo,proto3" json:"lowAmmo,omitempty"`
	Cover                int32       `protobuf:"varint,12,opt,name=cover,proto3" json:"cover,omitempty"`
	Grid                 *Grid       `protobuf:"bytes,13,opt,name=grid,proto3" json:"grid,omitempty"`
	PlayerInstructions   string      `protobuf:"bytes,14,opt,name=playerInstructions,proto3" json:"playerInstructions,omitempty"`
	ActionRequired       bool        `protobuf:"varint,15,opt,name=actionRequired,proto3" json:"actionRequired,omitempty"`
	Objective            *Grid       `protobuf:"bytes,16,opt,name=objective,proto3" json:"objective,omitempty"`
	MoveTo               *Grid       `protobuf:"bytes,17,opt,name=moveTo,proto3" json:"moveTo,omitempty"`
	GunTarget            *Grid       `protobuf:"bytes,18,opt,name=gunTarget,proto3" json:"gunTarget,omitempty"`
	SupportingUnit       string      `protobuf:"bytes,19,opt,name=supportingUnit,proto3" json:"supportingUnit,omitempty"`
	EngagedUnit          string      `protobuf:"bytes,20,opt,name=engagedUnit,proto3" json:"engagedUnit,omitempty"`
	Can                  *UnitAction `protobuf:"bytes,21,opt,name=can,proto3" json:"can,omitempty"`
	Has                  *UnitAction `protobuf:"bytes,22,opt,name=has,proto3" json:"has,omitempty"`
	Must                 *UnitAction `protobuf:"bytes,23,opt,name=must,proto3" json:"must,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

Unit details that can change from turn to turn

func (*UnitGameState) Descriptor

func (*UnitGameState) Descriptor() ([]byte, []int)

func (*UnitGameState) GetActionRequired

func (m *UnitGameState) GetActionRequired() bool

func (*UnitGameState) GetCan

func (m *UnitGameState) GetCan() *UnitAction

func (*UnitGameState) GetCover

func (m *UnitGameState) GetCover() int32

func (*UnitGameState) GetEngagedUnit

func (m *UnitGameState) GetEngagedUnit() string

func (*UnitGameState) GetFatigue

func (m *UnitGameState) GetFatigue() int32

func (*UnitGameState) GetFormation

func (m *UnitGameState) GetFormation() Formation

func (*UnitGameState) GetGrid

func (m *UnitGameState) GetGrid() *Grid

func (*UnitGameState) GetGunTarget

func (m *UnitGameState) GetGunTarget() *Grid

func (*UnitGameState) GetGunsDamaged

func (m *UnitGameState) GetGunsDamaged() bool

func (*UnitGameState) GetGunsDeployed

func (m *UnitGameState) GetGunsDeployed() bool

func (*UnitGameState) GetGunsStocked

func (m *UnitGameState) GetGunsStocked() bool

func (*UnitGameState) GetHas

func (m *UnitGameState) GetHas() *UnitAction

func (*UnitGameState) GetHasFired

func (m *UnitGameState) GetHasFired() bool

func (*UnitGameState) GetHidden

func (m *UnitGameState) GetHidden() bool

func (*UnitGameState) GetHits

func (m *UnitGameState) GetHits() int32

func (*UnitGameState) GetLowAmmo

func (m *UnitGameState) GetLowAmmo() bool

func (*UnitGameState) GetMoraleState

func (m *UnitGameState) GetMoraleState() MoraleState

func (*UnitGameState) GetMoveTo

func (m *UnitGameState) GetMoveTo() *Grid

func (*UnitGameState) GetMust

func (m *UnitGameState) GetMust() *UnitAction

func (*UnitGameState) GetObjective

func (m *UnitGameState) GetObjective() *Grid

func (*UnitGameState) GetPlayerInstructions

func (m *UnitGameState) GetPlayerInstructions() string

func (*UnitGameState) GetSkirmishersDeployed

func (m *UnitGameState) GetSkirmishersDeployed() int32

func (*UnitGameState) GetSupportingUnit

func (m *UnitGameState) GetSupportingUnit() string

func (*UnitGameState) ProtoMessage

func (*UnitGameState) ProtoMessage()

func (*UnitGameState) Reset

func (m *UnitGameState) Reset()

func (*UnitGameState) String

func (m *UnitGameState) String() string

func (*UnitGameState) XXX_DiscardUnknown

func (m *UnitGameState) XXX_DiscardUnknown()

func (*UnitGameState) XXX_Marshal

func (m *UnitGameState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UnitGameState) XXX_Merge

func (m *UnitGameState) XXX_Merge(src proto.Message)

func (*UnitGameState) XXX_Size

func (m *UnitGameState) XXX_Size() int

func (*UnitGameState) XXX_Unmarshal

func (m *UnitGameState) XXX_Unmarshal(b []byte) error

type UnitGrade

type UnitGrade int32
const (
	UnitGrade_CIVILIAN  UnitGrade = 0
	UnitGrade_MILITIA   UnitGrade = 1
	UnitGrade_CONSCRIPT UnitGrade = 2
	UnitGrade_REGULAR   UnitGrade = 3
	UnitGrade_VETERAN   UnitGrade = 4
	UnitGrade_ELITE     UnitGrade = 5
	UnitGrade_GUARD     UnitGrade = 6
)

func (UnitGrade) EnumDescriptor

func (UnitGrade) EnumDescriptor() ([]byte, []int)

func (UnitGrade) String

func (x UnitGrade) String() string

type UnitType

type UnitType int32
const (
	UnitType_SUPPORT_UNIT          UnitType = 0
	UnitType_INFANTRY_LINE         UnitType = 1
	UnitType_INFANTRY_LIGHT        UnitType = 2
	UnitType_INFANTRY_GRENADIER    UnitType = 3
	UnitType_INFANTRY_IRREGULAR    UnitType = 4
	UnitType_INFANTRY_RIFLES       UnitType = 5
	UnitType_CAVALRY_LIGHT         UnitType = 6
	UnitType_CAVALRY_HUSSAR        UnitType = 7
	UnitType_CAVALRY_DRAGOON       UnitType = 8
	UnitType_CAVALRY_CUIRASSIER    UnitType = 9
	UnitType_CAVALRY_COSSACK       UnitType = 10
	UnitType_CAVALRY_HEAVY         UnitType = 11
	UnitType_CAVALRY_MEDIUM        UnitType = 12
	UnitType_CAVALRY_LANCER        UnitType = 13
	UnitType_ARTILLERY_BN          UnitType = 14
	UnitType_ARTILLERY_LIGHT       UnitType = 15
	UnitType_ARTILLERY_MEDIUM      UnitType = 16
	UnitType_ARTILLERY_HEAVY       UnitType = 17
	UnitType_ARTILLERY_HORSE       UnitType = 18
	UnitType_ARTILLERY_LIGHT_HORSE UnitType = 19
)

func (UnitType) EnumDescriptor

func (UnitType) EnumDescriptor() ([]byte, []int)

func (UnitType) String

func (x UnitType) String() string

type Units

type Units struct {
	Commands             []*Command `protobuf:"bytes,1,rep,name=commands,proto3" json:"commands,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*Units) Descriptor

func (*Units) Descriptor() ([]byte, []int)

func (*Units) GetCommands

func (m *Units) GetCommands() []*Command

func (*Units) ProtoMessage

func (*Units) ProtoMessage()

func (*Units) Reset

func (m *Units) Reset()

func (*Units) String

func (m *Units) String() string

func (*Units) XXX_DiscardUnknown

func (m *Units) XXX_DiscardUnknown()

func (*Units) XXX_Marshal

func (m *Units) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Units) XXX_Merge

func (m *Units) XXX_Merge(src proto.Message)

func (*Units) XXX_Size

func (m *Units) XXX_Size() int

func (*Units) XXX_Unmarshal

func (m *Units) XXX_Unmarshal(b []byte) error

type Waypoint

type Waypoint struct {
	X        int32
	Y        int32
	X2       int32
	Y2       int32
	Speed    float64
	Elapsed  float64
	Turns    int
	Going    string
	Distance float64
	Path     string
	Prep     bool
}

Waypoint data for each segment of a move order

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL