Skip to content

Commit

Permalink
document purpose of the target generator
Browse files Browse the repository at this point in the history
  • Loading branch information
customcommander committed Oct 19, 2024
1 parent 41aef02 commit cb002c8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/lib-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,19 @@ export default function (definitions) {
todo
} = definitions;

/*
Defines a state for transient or secondary subtasks.
Example: "Take x Wood" task
The main objective is to update the supply, however it
can participate in the `replenish` phase of the game.
Note: the main purpose of a task should be implemented
in the `execute` function.
*/
const target = (name, impl) => impl && ({
[name]: {
always: {
Expand Down

0 comments on commit cb002c8

Please sign in to comment.