Documentation
¶
Index ¶
- Constants
- type Builder
- func (b *Builder) Create(options *bg.BoardGameOptions) (bg.BoardGame, error)
- func (b *Builder) CreateWithBGN(options *bg.BoardGameOptions) (bg.BoardGameWithBGN, error)
- func (b *Builder) Info() *bg.BoardGameInfo
- func (b *Builder) Key() string
- func (b *Builder) Load(game *bgn.Game) (bg.BoardGameWithBGN, error)
- type PlaceTileActionDetails
- type RotateTileActionDetails
- type Tsuro
- type TsuroMoreInfo
- type TsuroMoreOptions
- type TsuroSnapshotData
Constants ¶
const ( ActionPlaceTile = "PlaceTile" ActionRotateTileRight = "RotateTileRight" ActionRotateTileLeft = "RotateRileLeft" )
Action types
const ( VariantClassic = "Classic" // normal Tsuro VariantLongestPath = "LongestPath" // player with the longest path wins VariantMostCrossings = "MostCrossings" // player whose path crosses itself the most wins VariantOpenTiles = "OpenTiles" // tiles are shared globally VariantSolo = "Solo" // place tiles while keeping all tokens on the board )
Tsuro Variants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct{}
func (*Builder) CreateWithBGN ¶
func (b *Builder) CreateWithBGN(options *bg.BoardGameOptions) (bg.BoardGameWithBGN, error)
func (*Builder) Info ¶ added in v1.0.10
func (b *Builder) Info() *bg.BoardGameInfo
type PlaceTileActionDetails ¶
PlaceTileActionDetails is the action details for placing a tile in the desired location on the board
type RotateTileActionDetails ¶
type RotateTileActionDetails struct {
Tile string
}
RotateTileActionDetails is the action details for rotating a tile in hand
type Tsuro ¶
type Tsuro struct {
// contains filtered or unexported fields
}
func (*Tsuro) GetSnapshot ¶
func (t *Tsuro) GetSnapshot(team ...string) (*bg.BoardGameSnapshot, error)
type TsuroMoreInfo ¶ added in v1.0.10
type TsuroMoreInfo struct {
Variants []string
}
TsuroMoreInfo provides additional info about the game
type TsuroMoreOptions ¶
TsuroMoreOptions are the additional options for creating a game of Tsuro
