examples

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WAY_TOO_HOT  = 80
	TOO_HOT      = 70
	TOO_COLD     = 60
	WAY_TOO_COLD = 50
	COMFORTABLE  = (TOO_HOT + TOO_COLD) / 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvironmentController

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

func NewController

func NewController(hardware HVAC) *EnvironmentController

func (*EnvironmentController) Regulate

func (this *EnvironmentController) Regulate()

type Game

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

func NewGame

func NewGame() *Game

func (*Game) Roll

func (this *Game) Roll(pins int)

func (*Game) Score

func (this *Game) Score() (score int)

type HVAC

type HVAC interface {
	ActivateHeater()
	ActivateBlower()
	ActivateCooler()
	ActivateHighTemperatureAlarm()
	ActivateLowTemperatureAlarm()

	DeactivateHeater()
	DeactivateBlower()
	DeactivateCooler()
	DeactivateHighTemperatureAlarm()
	DeactivateLowTemperatureAlarm()

	IsHeating() bool
	IsBlowing() bool
	IsCooling() bool
	HighTemperatureAlarm() bool
	LowTemperatureAlarm() bool

	CurrentTemperature() int
}

Jump to

Keyboard shortcuts

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