Documentation ¶
Index ¶
Constants ¶
View Source
const ( DEVELOP_POINT = 20 BONUS_COUNT = 8 BONUS_POINT = 20 PLAYER = 2 COLOR = 5 CARD = 12 CARD_DOUBLE = 3 CARD_POINT = CARD - CARD_DOUBLE )
Variables ¶
View Source
var (
EMPTY_CARD = Card{-1}
)
View Source
var Instance = &game.Game{ Id: "lost-cities", Name: "失落的城市", Player: game.Range{ Min: 2, Max: 2, }, Options: nil, NewEvent: func() game.Event { e := Event{} e.BaseEvent.ResponseStream = make(chan game.Response, 5) return &e }, OnEvent: func(e game.Event) game.Response { eventStream <- e return e.GetResponse() }, }
Functions ¶
This section is empty.
Types ¶
type Game ¶
type Game struct { Thread space.Publisher Current int Deck []Card // [index] from 0 (top) Board [][][]Card // [player][color][index] from 0 (oldest) Drop [][]Card // [color][index] from 0 (oldest) Hand [][]Card // [player][index] no order, by default 0 (oldest) }
func NewStandardGame ¶
func NewStandardGame() *Game
Click to show internal directories.
Click to hide internal directories.