mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
examples/2048: Bug fix: Tests didn't work
This commit is contained in:
parent
c925b9de55
commit
c289b13a91
@ -39,6 +39,7 @@ script:
|
|||||||
- test -z $(gofmt -s -l $GOPATH/src/github.com/hajimehoshi/ebiten)
|
- test -z $(gofmt -s -l $GOPATH/src/github.com/hajimehoshi/ebiten)
|
||||||
- go build -tags example -v github.com/hajimehoshi/ebiten/examples/...
|
- go build -tags example -v github.com/hajimehoshi/ebiten/examples/...
|
||||||
- go test -v github.com/hajimehoshi/ebiten/...
|
- go test -v github.com/hajimehoshi/ebiten/...
|
||||||
|
- go test -tags=example -v github.com/hajimehoshi/ebiten/examples/...
|
||||||
- gopherjs build --tags example -v github.com/hajimehoshi/ebiten/examples/blocks
|
- gopherjs build --tags example -v github.com/hajimehoshi/ebiten/examples/blocks
|
||||||
|
|
||||||
# Looks like testing GL on node is hard.
|
# Looks like testing GL on node is hard.
|
||||||
|
@ -94,6 +94,30 @@ type Tile struct {
|
|||||||
poppingCount int
|
poppingCount int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pos returns the tile's current position.
|
||||||
|
// Pos is used only at testing so far.
|
||||||
|
func (t *Tile) Pos() (int, int) {
|
||||||
|
return t.current.x, t.current.y
|
||||||
|
}
|
||||||
|
|
||||||
|
// NextPos returns the tile's next position.
|
||||||
|
// NextPos is used only at testing so far.
|
||||||
|
func (t *Tile) NextPos() (int, int) {
|
||||||
|
return t.next.x, t.next.y
|
||||||
|
}
|
||||||
|
|
||||||
|
// Value returns the tile's current value.
|
||||||
|
// Value is used only at testing so far.
|
||||||
|
func (t *Tile) Value() int {
|
||||||
|
return t.current.value
|
||||||
|
}
|
||||||
|
|
||||||
|
// NextValue returns the tile's current value.
|
||||||
|
// NextValue is used only at testing so far.
|
||||||
|
func (t *Tile) NextValue() int {
|
||||||
|
return t.next.value
|
||||||
|
}
|
||||||
|
|
||||||
// NewTile creates a new Tile object.
|
// NewTile creates a new Tile object.
|
||||||
func NewTile(value int, x, y int) *Tile {
|
func NewTile(value int, x, y int) *Tile {
|
||||||
return &Tile{
|
return &Tile{
|
||||||
|
Loading…
Reference in New Issue
Block a user