component

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Configuration = donburi.NewComponentType[ConfigurationData](
	ConfigurationData{BoardSize: 9, DarkMode: true},
)
View Source
var PositionComponent = donburi.NewComponentType[Position]()

Functions

This section is empty.

Types

type BoardState

type BoardState struct {
	Stones     []Oponent
	Points     [2]float32
	PlayerTurn Turn
	JustPassed bool
	LastMove   *Position
	HLiberties []Position
	HGroup     []Position
	HEnemies   []Position
}

type ConfigurationData

type ConfigurationData struct {
	BoardSize int
	AIEnabled bool
	Assets    fs.FS
	DarkMode  bool
}

type Oponent

type Oponent int
const (
	EMPTY Oponent = iota
	BLACK
	WHITE
)

type Position

type Position image.Point

type Turn

type Turn bool
const (
	BLACK_TURN Turn = false
	WHITE_TURN Turn = true
)

func (Turn) String

func (pt Turn) String() string

func (*Turn) Toggle

func (pt *Turn) Toggle()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL