millipede

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package millipede provides a framework for creating millipedes. millipede is designed to be easy to understand and write, the most simple application can be written as follow:

func main() {
  fmt.Println(millipede.New(20))
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StringToRuneSlice

func StringToRuneSlice(input string) []rune

StringToRuneSlice converts a string to a slice of runes

Types

type Millipede

type Millipede struct {
	// Size is the amount of feet pairs
	Size uint64

	// Reverse is the flag that indicates the direction (up/down)
	Reverse bool

	// Skin is the current millipede skin (template)
	Skin string

	// Opposite is the flag that indicates the direction (left/right)
	Opposite bool

	// Width is the width of the millipede (depending on its age and the food it consumes)
	Width uint64

	// Curve is the size of the curve
	Curve uint64
}

func New

func New(size uint64) *Millipede

New returns a millipede

func (*Millipede) String

func (m *Millipede) String() string

String returns a string representing a millipede

type Skin

type Skin struct {
	// Head is used by the millipede to think about its life
	Head string
	// Pede are what make this arthropod so special
	Pede string

	// Reverse is the reverse skin of the millipede
	Reverse *Skin
}

Jump to

Keyboard shortcuts

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