Genes

class Genes(seed: Long)

A drawing's recipe, and the rules that change it.

One or two genes change at the accepted section boundary, three or more on every fourth accepted boundary, one on every morph of the evolution pacer, all go to their busiest end on a drop and their sparest on a breakdown. Seeded, so a run replays exactly.

Constructors

Link copied to clipboard
constructor(seed: Long)

Properties

Link copied to clipboard
val all: List<Gene>
Link copied to clipboard

How many single changes have happened, for tests and readouts.

Link copied to clipboard
var walk: Float

A colour offset that walks one full turn every eight slow visual cycles.

Functions

Link copied to clipboard
fun advance(gestures: Gestures, deltaSeconds: Float, morph: Boolean = false)

Moves the recipe on by one frame, after gestures has read the same frame. morph mutates one gene.

Link copied to clipboard
fun choice(name: String, options: Int, start: Int = 0, most: Int = options - 1, least: Int = 0): ChoiceGene
Link copied to clipboard
fun mutateNow(count: Int = 2)

Changes count genes at once, for a button that says "change it now".

Link copied to clipboard
fun number(name: String, min: Float, max: Float, start: Float, mostAtMax: Boolean = true): NumberGene
Link copied to clipboard
fun restart()
Link copied to clipboard
fun toggle(name: String, start: Boolean, most: Boolean = true): ChoiceGene