emulator

package
v0.0.0-...-6df95b1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PlayerOneFirstBit = "0"
	PlayerTwoFirstBit = "1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Director

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

func NewDirector

func NewDirector(ctx context.Context, imageChannel chan *image.RGBA, inputChannel chan string) *Director

func (*Director) PlayGame

func (d *Director) PlayGame(path string)

func (*Director) Run

func (d *Director) Run()

func (*Director) SetView

func (d *Director) SetView(view View)

SetView nil do saving stuff

func (*Director) Start

func (d *Director) Start(paths []string)

func (*Director) Step

func (d *Director) Step()

Step stop being called means the game emulator stops

type GameView

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

func (*GameView) Enter

func (view *GameView) Enter()

func (*GameView) Exit

func (view *GameView) Exit()

func (*GameView) Update

func (view *GameView) Update(t, dt float64)

type View

type View interface {
	Enter()
	Exit()
	Update(t, dt float64)
}

func NewGameView

func NewGameView(director *Director, console *nes.Console, hash string, imageChannel chan *image.RGBA, inputChannel chan string) View

Jump to

Keyboard shortcuts

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