geneticshuman

package
v0.0.0-...-55aabcf Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: GPL-3.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GGender = genetics.Gene{
		NumBits: 2,
		Offset:  62,
	}
	GEyeColor = genetics.Gene{
		NumBits: 2,
		Offset:  60,
	}
	GHairColor = genetics.Gene{
		NumBits: 3,
		Offset:  57,
	}
	GComplexion = genetics.Gene{
		NumBits: 4,
		Offset:  53,
	}
	GHeight = genetics.Gene{
		NumBits: 3,
		Offset:  50,
	}
	GMass = genetics.Gene{
		NumBits: 3,
		Offset:  47,
	}
	GGrowth = genetics.Gene{
		NumBits: 3,
		Offset:  44,
	}
	GStrength = genetics.Gene{
		NumBits: 4,
		Offset:  40,
	}
	GIntelligence = genetics.Gene{
		NumBits: 4,
		Offset:  36,
	}
	GDexterity = genetics.Gene{
		NumBits: 4,
		Offset:  32,
	}
	GResilience = genetics.Gene{
		NumBits: 4,
		Offset:  28,
	}
	GOpenness = genetics.Gene{
		NumBits: 4,
		Offset:  24,
	}
	GConscientiousness = genetics.Gene{
		NumBits: 4,
		Offset:  20,
	}
	GExtraversion = genetics.Gene{
		NumBits: 4,
		Offset:  16,
	}
	GAgreeableness = genetics.Gene{
		NumBits: 4,
		Offset:  12,
	}
	GNeuroticism = genetics.Gene{
		NumBits: 4,
		Offset:  8,
	}
)

Functions

func GetHairColorStr

func GetHairColorStr(g *genetics.Genes) string

func SetEyeColor

func SetEyeColor(g *genetics.Genes, val EyeColor)

func SetGender

func SetGender(g *genetics.Genes, val Gender)

func SetHairColor

func SetHairColor(g *genetics.Genes, val HairColor, curls bool)

func String

func String(g genetics.Genes) string

Types

type Attrs

type Attrs struct {
	Complexion int
	Height     int
	Mass       int
	Growth     int
}

func GetAttrs

func GetAttrs(g *genetics.Genes) Attrs

func (Attrs) String

func (s Attrs) String() string

type EyeColor

type EyeColor int
const (
	EyeColorRed   EyeColor = 0x0
	EyeColorBlue  EyeColor = 0x1
	EyeColorGreen EyeColor = 0x2
	EyeColorBrown EyeColor = 0x3
)

func GetEyeColor

func GetEyeColor(g *genetics.Genes) EyeColor

func (EyeColor) String

func (g EyeColor) String() string

type FiveFactor

type FiveFactor struct {
	Openness          int
	Conscientiousness int
	Extraversion      int
	Agreeableness     int
	Neuroticism       int
}

func GetFiveFactor

func GetFiveFactor(g *genetics.Genes) FiveFactor

func (FiveFactor) String

func (s FiveFactor) String() string

type Gender

type Gender int
const (
	GenderMale   Gender = 0x1
	GenderFemale Gender = 0x3
)

func GetGender

func GetGender(g *genetics.Genes) Gender

func (Gender) String

func (g Gender) String() string

type HairColor

type HairColor int
const (
	HairColorBlonde   HairColor = 0x0
	HairColorRed      HairColor = 0x1
	HairColorBrown    HairColor = 0x2
	HairColorBlack    HairColor = 0x3
	HairColorCurlMask HairColor = 0x4
)

func GetHairColor

func GetHairColor(g *genetics.Genes) (HairColor, bool)

type Stats

type Stats struct {
	Strength     int
	Intelligence int
	Dexterity    int
	Resilience   int
}

func GetStats

func GetStats(g *genetics.Genes) Stats

func (Stats) String

func (s Stats) String() string

Jump to

Keyboard shortcuts

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