gui

package
v0.0.0-...-9e740c1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package gui contains the graphical user interface of Tetris-AI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GUI

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

GUI is the graphical user interface of Tetris-AI. GUI encapsulates an AI that plays tetris and visualization logic. The zero value of GUI is not usable, function New should be used to create one.

func New

func New() *GUI

New creates and initializes a new GUI.

func (*GUI) Start

func (gui *GUI) Start() error

Start starts the AI's game and the visualization loop.

type Screen

type Screen int

Screen represents the the different screens of Tetris AI that the user sees.

const (
	ScreenWelcome Screen = iota
	ScreenPlay
)

The possible screens are ScreenWelcome (intial) and ScreenPlay.

Jump to

Keyboard shortcuts

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