testcore

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package testcore is a tiny game written in Go: a square you move around a coloured field, a tone while a button is held, and a counter kept in save memory. It needs no third-party core or ROM, so the whole path from library to browser can be tested on any machine, including CI.

Index

Constants

View Source
const (
	Width  = 256
	Height = 224
	Rate   = 44100
	FPS    = 60
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

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

Core implements engine.Engine.

func New

func New(h engine.Handlers) *Core

New makes a core reporting to h.

func (*Core) Close

func (c *Core) Close()

func (*Core) LoadGame

func (c *Core) LoadGame(path string) (engine.AVInfo, error)

LoadGame reads the "ROM". Any non-empty file works: its checksum picks the colours, so two test games can be told apart.

func (*Core) LoadState

func (c *Core) LoadState(b []byte) bool

func (*Core) Reset

func (c *Core) Reset()

func (*Core) Run

func (c *Core) Run()

func (*Core) SaveRAM

func (c *Core) SaveRAM() []byte

func (*Core) SaveState

func (c *Core) SaveState() []byte

func (*Core) SystemInfo

func (c *Core) SystemInfo() engine.SystemInfo

Jump to

Keyboard shortcuts

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