Documentation
¶
Index ¶
- func WithColor(c color.Color) optionsFn
- func WithDumpErrorImages() optionsFn
- func WithFace(f text.Face) optionsFn
- type Ball
- type BallKeyTap
- type Ebitest
- func (e *Ebitest) Close()
- func (e *Ebitest) GetAll(s interface{}) []*Selector
- func (e *Ebitest) KeyTap(keys ...ebiten.Key)
- func (e *Ebitest) Must(t *testing.T, s interface{}) *Selector
- func (e *Ebitest) MustNot(t *testing.T, s interface{})
- func (e *Ebitest) Should(t *testing.T, s interface{}) (*Selector, bool)
- func (e *Ebitest) ShouldNot(t *testing.T, s interface{}) bool
- type Game
- type PingPong
- type Selector
- type TicTacToe
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithDumpErrorImages ¶
func WithDumpErrorImages() optionsFn
WithDumpErrorImages enables the option to output a custom image when a test fails that has the screen and the image that was tried to match in order to debug it
Types ¶
type Ball ¶ added in v0.0.2
type Ball struct {
X, Y int
KeyTap BallKeyTap
}
type BallKeyTap ¶ added in v0.0.2
type Ebitest ¶
type Ebitest struct {
PingPong *PingPong
// contains filtered or unexported fields
}
func (*Ebitest) GetAll ¶ added in v0.0.3
GetAll returns all the repeated instances of s or none if nothing is found
func (*Ebitest) Must ¶
Must checks if selector(s) is present in the game and returns it. If it's not present it'll fail the test s can be a: 'string', 'image.Image', '*ebiten.Image' and '*ebitest.Selector'
func (*Ebitest) MustNot ¶
MustNot checks if selector(s) is not present in the game. If it's present it'll fail the test s can be a: 'string', 'image.Image', '*ebiten.Image' and '*ebitest.Selector'
type PingPong ¶
type PingPong struct {
// contains filtered or unexported fields
}
PingPong used to switch contexts between goroutines
func (*PingPong) ClickPong ¶ added in v0.0.2
ClickPong will read on ping if any present and then will send to pong
func (*PingPong) KeyTapPing ¶ added in v0.0.2
Ping sends a ping and waits for a Pong
func (*PingPong) KeyTapPong ¶ added in v0.0.2
Pong will read on ping if any present and then will send to pong
type Selector ¶
type Selector struct {
PingPong *PingPong
// contains filtered or unexported fields
}
Selector represents the thing you are searching for
func NewFromImage ¶
NewFromImage creates a new Selector from an image
func NewFromText ¶
NewFromText crates a new Selector from a txt
type TicTacToe ¶ added in v0.0.2
type TicTacToe struct {
// contains filtered or unexported fields
}
TicTacToe is a synchronizer of 3 channesl
func NewTicTacToe ¶ added in v0.0.2
func NewTicTacToe() *TicTacToe
NewTicTacToe returns a new TicTacToe