Table of Contents

Struct Household.RandomPerson

Namespace
TinyLife.World
Assembly
TinyLife.dll

A helper struct used for RandomConstellations to refer to a person of a given Type with the given AgeGroup.

public readonly record struct Household.RandomPerson : IEquatable<Household.RandomPerson>
Implements
Inherited Members
Extension Methods

Constructors

RandomPerson(Type, AgeGroup)

A helper struct used for RandomConstellations to refer to a person of a given Type with the given AgeGroup.

public RandomPerson(Type Type, AgeGroup Age)

Parameters

Type Type

The person type, as registered into Types.

Age AgeGroup

The age group.

Properties

Age

The age group.

public AgeGroup Age { get; init; }

Property Value

AgeGroup

Type

The person type, as registered into Types.

public Type Type { get; init; }

Property Value

Type

Methods

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

implicit operator RandomPerson(AgeGroup)

Converts the given age into a Household.RandomPerson of type Person.

public static implicit operator Household.RandomPerson(AgeGroup age)

Parameters

age AgeGroup

The age group.

Returns

Household.RandomPerson

A Household.RandomPerson with the given age and the type Person.