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 StateTurn1 = 30 StateTurn2 = 31 StateCubeValue = 32 StateCubePlayer = 33 StatePoints1 = 34 StatePoints2 = 35 StateTotalPoints = 36 StateCrawford = 37 StateJacoby = 38 StateMurphy = 39 StateBeavers = 40 StateVariant = 41 StateEntered1 = 42 StateEntered2 = 43 )
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 = 44
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.