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 Connect4
- type Connect4SnapshotData
- type PlaceDiskActionDetails
Constants ¶
View Source
const (
// ActionPlaceDisk allows players place a disk in a column
ActionPlaceDisk = "PlaceDisk"
)
Action types
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.4
func (b *Builder) Info() *bg.BoardGameInfo
type Connect4 ¶
type Connect4 struct {
// contains filtered or unexported fields
}
func NewConnect4 ¶
func NewConnect4(options *bg.BoardGameOptions) (*Connect4, error)
func (*Connect4) GetSnapshot ¶
func (c *Connect4) GetSnapshot(team ...string) (*bg.BoardGameSnapshot, error)
type Connect4SnapshotData ¶
type Connect4SnapshotData struct {
Board [][]*string
}
Connect4SnapshotData is the game data unique to Connect4
type PlaceDiskActionDetails ¶
type PlaceDiskActionDetails struct {
Column int
}
PlaceDiskActionDetails is the action details for placing a disk in the desired column of the board
Click to show internal directories.
Click to hide internal directories.
