spaceinvaders

package
v0.0.0-...-da552d6 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnthenaSizeFromKey

func AnthenaSizeFromKey(c uint8) int

AnthenaSizeFromKey returns the size of the anthenas that the invader should have, with respect to the character passed as argument. If it fails to parse the character it return the value of 2.

func AnthenasFromKey

func AnthenasFromKey(c uint8) int

AnthenasFromKey returns the number of anthenas that the invader should have, with respect to the character passed as argument. If it fails to parse the character it return the value of 2.

func ArmSizeFromKey

func ArmSizeFromKey(c uint8) int

ArmSizeFromKey returns the size of the arms that the invader should have, with respect to the character passed as argument. If it fails to parse the character it return the value of 2.

func ArmsFromKey

func ArmsFromKey(c uint8) int

ArmsFromKey returns the number of arms that the invader should have, with respect to the character passed as argument. If it fails to parse the character it return the value of 2.

func EyesFromKey

func EyesFromKey(c uint8) int

EyesFromKey returns the number of eyes that the invader should have, with respect to the character passed as argument. If it fails to parse the character it return the value of 2.

func HasArmsUpFromKey

func HasArmsUpFromKey(c uint8) bool

HasArmsUpFromKey tells you if the invader should it's arms up or not, with respect to the character passed as argument. If it fails to parse the character it return true.

func HasFootFromKey

func HasFootFromKey(c uint8) bool

HasFootFromKey tells you if the invader should have feets or not, with respect to the character passed as argument. If it fails to parse the character it return true.

func HeightFromKey

func HeightFromKey(c uint8) int

HeightFromKey returns the height that the invader should have, with respect to the character passed as argument. If it fails to parse the character it return the value of 6.

func LegsFromKey

func LegsFromKey(c uint8) int

LegsFromKey returns the number of legs that the invader should have, with respect to the character passed as argument. If it fails to parse the character it return the value of 3.

func LengthFromKey

func LengthFromKey(c uint8) int

LengthFromKey returns the number of anthenas that the invader should have, with respect to the character passed as argument. If it fails to parse the character it return the value of 7.

func SpaceInvaders

func SpaceInvaders(w io.Writer, key string, colors []color.RGBA, size int)

SpaceInvaders builds a space invader svg image based on the 'key' and 'colors' passed as arguments. The svg image is written to the io.Writer passed as argument.

Types

This section is empty.

Jump to

Keyboard shortcuts

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