Species
Species class.
Species
Species in Tölvera.
Species are implemented as a State with attributes for size
, speed
, mass
and
colour
(rgba), and with a length determined by the number of species in the
Tölvera instance (tv.sn
). The attributes are normalised and scaled by species the
species_consts
attribute. They are initialised with random values.
Rather than accessing this class directly, access is typically via the State
attributes via the Tölvera instance, via e.g. tv.s.species.field[i].size
.
Source code in src/tolvera/species.py
__init__(tolvera, **kwargs)
Initialise Species
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tolvera |
Tolvera
|
Tolvera instance. |
required |
**kwargs |
Keyword arguments. |
{}
|