game

package
v0.0.0-...-8520766 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Board

type Board struct {
	Size      int
	GameBoard [][]int
}

func (*Board) CalculateScore

func (b *Board) CalculateScore() int

func (*Board) CloneBoard

func (b *Board) CloneBoard() *Board

func (*Board) DeepEqual

func (b *Board) DeepEqual(other *Board) bool

func (*Board) TryAddBlock

func (b *Board) TryAddBlock()

type State

type State struct {
	Board *Board
	Seed  int64
	State Status
}

func NewState

func NewState() *State

func (*State) Initialize

func (g *State) Initialize()

func (*State) MoveDown

func (g *State) MoveDown()

func (*State) MoveLeft

func (g *State) MoveLeft()

func (*State) MoveRight

func (g *State) MoveRight()

func (*State) MoveUp

func (g *State) MoveUp()

type Status

type Status int
const (
	Loading Status = iota
	New
	Running
	Lose
)

Jump to

Keyboard shortcuts

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