tetris

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TetrominoWidth, TetrominoHeight = 4, 4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Board

type Board struct {
	// contains filtered or unexported fields
}

func NewBoard

func NewBoard(w int, h int) *Board

type Cell

type Cell struct {
	// contains filtered or unexported fields
}

func NewCell

func NewCell(x, y int, ch rune) *Cell

type Ranking

type Ranking struct {
	// contains filtered or unexported fields
}

func NewRanking

func NewRanking() *Ranking

type Tetris

type Tetris struct {
	// contains filtered or unexported fields
}

func New

func New(w int, h int) *Tetris

func (*Tetris) ApplyGravity

func (t *Tetris) ApplyGravity()

func (*Tetris) Draw

func (t *Tetris) Draw(surface interfaces.ISurface)

func (*Tetris) Drop

func (t *Tetris) Drop()

func (*Tetris) GetSize

func (t *Tetris) GetSize() (int, int)

func (*Tetris) Init

func (t *Tetris) Init(w int, h int)

func (*Tetris) MoveDown

func (t *Tetris) MoveDown()

func (*Tetris) MoveLeft

func (t *Tetris) MoveLeft()

func (*Tetris) MoveRight

func (t *Tetris) MoveRight()

func (*Tetris) RotateLeft

func (t *Tetris) RotateLeft()

func (*Tetris) RotateRight

func (t *Tetris) RotateRight()

type Tetromino

type Tetromino struct {
	// contains filtered or unexported fields
}

func NewMino

func NewMino() *Tetromino

Jump to

Keyboard shortcuts

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