add "number" facts, and provide appropriate operators and conditions
Currently HypeDyn implements true/false and text facts. It would be very useful to also provide "number" facts, which can be set, have operations performed on them (+,-,*,/ etc.), and be checked against conditions (>, <, =, etc.).
Blueprint information
- Status:
- Complete
- Approver:
- Alex Mitchell
- Priority:
- Medium
- Drafter:
- Alex Mitchell
- Direction:
- Needs approval
- Assignee:
- teongleong
- Definition:
- Approved
- Series goal:
- Accepted for 2.2
- Implementation:
- Implemented
- Milestone target:
- 2.2a5
- Started by
- teongleong
- Completed by
- Alex Mitchell
Related branches
Related bugs
Sprints
Whiteboard
1) allow number facts to be set to a constant value
2) allow number facts to be set to another number fact
3) allow number facts to be set to the value of a simple expression
UI should be as follows
update fact [number] [thefact] [value] to [text entry for numeric value]
or
update fact [number] [thefact] [fact] to [otherfact]
or
update fact [number] [thefact] [expression] to [value|fact] [textentry|fact] [op] [value|fact] [textentry|fact]
So for now don't allow nested expressions.
4) allow number facts to be used in conditions, and compared against either a constant value or another number fact. Comparison operators: =, <, > <=, >=, not=
Note: 1 and 2 require a new action to be added, and 3 requires a new condition to be added.
Also note: while working on this, be aware of what changes are required to add the number facts, thinking of how we can make it easier to make this sort of addition to the system in future.