stars

package
v0.0.0-...-07010e4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Galaxy

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

func NewGalaxy

func NewGalaxy(sts []*Star) *Galaxy

func (*Galaxy) Dump

func (g *Galaxy) Dump() string

func (*Galaxy) Score

func (g *Galaxy) Score() int

func (*Galaxy) Step

func (g *Galaxy) Step()

type Star

type Star struct {
	Pos Vector
	Vel Vector
}

func Parse

func Parse(s string) (*Star, error)

func (Star) String

func (s Star) String() string

type Vector

type Vector struct {
	X, Y int
}

func (Vector) String

func (v Vector) String() string

Jump to

Keyboard shortcuts

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