machine

package
v0.0.0-...-8f43889 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Machine

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

Machine emulates the Space Invaders hardware.

func New

func New(mem cpu.MemReadWriter, opts ...Option) (m *Machine, err error)

New returns an instantiated Space Invaders machine.

func (*Machine) Run

func (m *Machine) Run()

Run emulates the Space Invaders machine.

type Option

type Option func(*Machine)

Option is a functional option that modifies a field on the machine.

func WithDebugEnabled

func WithDebugEnabled() Option

WithDebugEnabled enables debug mode on the machine.

func WithScaleFactor

func WithScaleFactor(sf int) Option

WithScaleFactor sets the video scale factor.

Jump to

Keyboard shortcuts

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