Skip to content

PlayerPersonality

Samuel Gomes edited this page Jul 3, 2024 · 6 revisions

PlayerPersonality

Abstract class that represents the inherent preference of a subject through their personality. Different personality models can be implemented as subclasses.

Constructor

+ PlayerPersonality(): void

Attributes

Name: expected type Default value Description
(auto,auxiliary) maxDifferenceValue: decimal 1.0 Used if the distance between personality profiles is needed. The maximum difference value between two personalities.

Methods

+ getPersonalityString(): string

Description

(virtual) It returns a textual representation of the personality profile.

+ getPairPersonalityDiversity(other: PlayerPersonality): decimal

Description

(virtual) It determines the difference between two personality profiles. In the concrete implementations, other type should match the caller and the returned value should be normalized: from 0 (no difference) to 1 (max difference).

+ getTeamPersonalityDiversity(players: PlayerPersonality[]): decimal

Description

(virtual) It calculates a group diversity value. In the concrete implementations, the type of each member of players should match the caller and the returned value should be normalized: from 0 (no difference) to 1 (max difference).

Clone this wiki locally