-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
corePart of the core game designPart of the core game design
Description
A Rating is a combination of integers ranging from 1-6.
Typical ratings are measured by Tier and Degree. They may also be measured by Minute and Second.
The implementation must meet the following requirements:
- It must initialize without any parameters to have a Tier of
1and a Degree of1. - It must be represented in a string as
<Tier>:<Degree>[:<Minute>[:<Second]], where Minute and Second are left off if0. - If it isn't initialized with a Minute, it can't be initialized with a Second.
- If it isn't initialized with a Minute, one can't be set later.
- If it isn't initialized with a Second, one can't be set later.
- It must be comparable to another rating, comparing each defined property in turn. For comparing ratings
aandb: - Ifa.Tier > b.Tier, a is greater thanb.- If
a.Tier < b.Tier, b is greater thana. - If
a.Tier == b.Tier, compare by Degree. - If
a.Degree == b.Degree, compare by Minute. - If
a.Minute == b.Minute && a.Minute == 0 && b.Minute == 0, they are equal. Otherwise, compare by Second.
- If
- It must be possible to add an integer to a Rating. By default, it should increment the last non-zero field by the specified. If this would make the field's value
7or more, increase the previous field by1and reset the current field to1. This behavior should cascade upward. If the addition would result in a cascade beyond tier, handle it by firing an invalid operation event or raising an error. - It must be possible to subtract an integer from a Rating, following the same logic as addition but cascading if the current field's value would be less than 1 and resetting the current field to 6 before continuing.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
corePart of the core game designPart of the core game design
Type
Projects
Status
🛠 WIP