Versions in this module Expand all Collapse all v2 v2.0.7 Mar 14, 2021 Changes in this version + const ScreenHeight + const ScreenWidth + var Pieces map[BlockType]*Piece + type Angle int + const Angle0 + const Angle180 + const Angle270 + const Angle90 + func (a Angle) RotateLeft() Angle + func (a Angle) RotateRight() Angle + type BlockType int + const BlockType1 + const BlockType2 + const BlockType3 + const BlockType4 + const BlockType5 + const BlockType6 + const BlockType7 + const BlockTypeMax + const BlockTypeNone + type Field struct + func (f *Field) AbsorbPiece(piece *Piece, x, y int, angle Angle) + func (f *Field) Draw(r *ebiten.Image, x, y int) + func (f *Field) DropPiece(piece *Piece, x, y int, angle Angle) int + func (f *Field) IsBlocked(x, y int) bool + func (f *Field) IsFlushAnimating() bool + func (f *Field) MovePieceToLeft(piece *Piece, x, y int, angle Angle) int + func (f *Field) MovePieceToRight(piece *Piece, x, y int, angle Angle) int + func (f *Field) PieceDroppable(piece *Piece, x, y int, angle Angle) bool + func (f *Field) RotatePieceLeft(piece *Piece, x, y int, angle Angle) Angle + func (f *Field) RotatePieceRight(piece *Piece, x, y int, angle Angle) Angle + func (f *Field) SetEndFlushAnimating(fn func(lines int)) + func (f *Field) Update() + type Game struct + func (g *Game) Draw(screen *ebiten.Image) + func (g *Game) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int) + func (g *Game) Update() error + type GameScene struct + func NewGameScene() *GameScene + func (s *GameScene) Draw(r *ebiten.Image) + func (s *GameScene) Update(state *GameState) error + type GameState struct + Input *Input + SceneManager *SceneManager + type GamepadScene struct + func (s *GamepadScene) Draw(screen *ebiten.Image) + func (s *GamepadScene) Update(state *GameState) error + type Input struct + func (i *Input) GamepadIDButtonPressed() ebiten.GamepadID + func (i *Input) IsRotateLeftJustPressed() bool + func (i *Input) IsRotateRightJustPressed() bool + func (i *Input) StateForDown() int + func (i *Input) StateForLeft() int + func (i *Input) StateForRight() int + func (i *Input) Update() + type Piece struct + func (p *Piece) AbsorbInto(field *Field, x, y int, angle Angle) + func (p *Piece) Draw(r *ebiten.Image, x, y int, angle Angle) + func (p *Piece) DrawAtCenter(r *ebiten.Image, x, y, width, height int, angle Angle) + func (p *Piece) InitialPosition() (int, int) + type Scene interface + Draw func(screen *ebiten.Image) + Update func(state *GameState) error + type SceneManager struct + func (s *SceneManager) Draw(r *ebiten.Image) + func (s *SceneManager) GoTo(scene Scene) + func (s *SceneManager) Update(input *Input) error + type TitleScene struct + func (s *TitleScene) Draw(r *ebiten.Image) + func (s *TitleScene) Update(state *GameState) error Other modules containing this package github.com/MattSwanson/ebiten