Documentation ¶
Index ¶
- Constants
- func DecodeEvent(message []byte) (interface{}, error)
- func EncodeEvent(e interface{}) ([]byte, error)
- func EncodeState(s *State) []int
- type BeaversType
- type ChooseRoll
- type CubeEvaluation
- type Event
- type EventFailChoose
- type EventFailDouble
- type EventFailMove
- type EventFailSet
- type EventOkBEI
- type EventOkChoose
- type EventOkDouble
- type EventOkList
- type EventOkMove
- type EventOkSet
- type ListEntry
- type Move
- type Play
- type Probabilities
- type SettingType
- type State
Constants ¶
View Source
const ( CommandBEI = "bei" CommandList = "list" CommandSet = "set" CommandDouble = "double" CommandMove = "move" CommandChoose = "choose" )
View Source
const ( StateHome1 = 0 StateHome2 = 25 StateBar1 = 26 StateBar2 = 27 StateRoll1 = 28 StateRoll2 = 29 StateRoll3 = 30 StateTurn1 = 31 StateTurn2 = 32 StateCubeValue = 33 StateCubePlayer = 34 StatePoints1 = 35 StatePoints2 = 36 StateTotalPoints = 37 StateCrawford = 38 StateJacoby = 39 StateMurphy = 40 StateBeavers = 41 StateVariant = 42 StateEntered1 = 43 StateEntered2 = 44 )
View Source
const ( EventTypeOkBEI = "okbei" EventTypeOkList = "oklist" EventTypeFailSet = "failset" EventTypeOkSet = "okset" EventTypeFailDouble = "faildouble" EventTypeOkDouble = "okdouble" EventTypeFailMove = "failmove" EventTypeOkMove = "okmove" EventTypeFailChoose = "failchoose" EventTypeOkChoose = "okchoose" )
View Source
const CellCount = 45
Variables ¶
This section is empty.
Functions ¶
func DecodeEvent ¶
func EncodeEvent ¶
func EncodeState ¶
Types ¶
type BeaversType ¶
type BeaversType int
const ( BeaversNone BeaversType = iota BeaversOnly BeaversAndRaccoons )
type ChooseRoll ¶
type ChooseRoll struct { Roll int Probabilities Probabilities }
type CubeEvaluation ¶
type EventFailChoose ¶
type EventFailDouble ¶
type EventFailMove ¶
type EventFailSet ¶
type EventOkChoose ¶
type EventOkChoose struct { Event Rolls []*ChooseRoll }
type EventOkDouble ¶
type EventOkDouble struct { Event Cube CubeEvaluation Probabilities Probabilities }
type EventOkList ¶
type EventOkMove ¶
type EventOkSet ¶
type Move ¶
type Move struct { Play []*Play Probabilities Probabilities }
type Probabilities ¶
type SettingType ¶
type SettingType int
const ( SettingBoolean SettingType = iota SettingInteger SettingString )
Click to show internal directories.
Click to hide internal directories.