New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add javadoc to restore events and RestorationAuthoritySystem #17
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice and easy to review and approve! Left a few comments anyway but they're more about trivial wording issues than anything blocking a merge.
@@ -23,13 +24,20 @@ | |||
public class DoRestoreEvent implements Event { | |||
/** The amount of health points being restored. */ | |||
private int amount; | |||
/** The instigator of restoration */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny suggestion: rather than use instigator
which is already the variable name use a synonym to increase the odds that a reader will understand (instigator could be a somewhat rare word)
/** The instigator of restoration */ | |
/** The entity that caused the restoration */ |
* To increase the health of an entity, send DoRestoreEvent | ||
* <p> | ||
* Logic flow for restoration: | ||
* - DoRestoreEvent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is too big to consider as part of this PR (since the same word is in use many other places) but I wonder if do
is a good term in general for the starting phase of an event chain like this one. "Do" to me very much means that the thing is happening right now. Maybe "Perform" would give a better impression that it is more like an action that is being performed, almost like a stage play might be going through several phases to arrive at an action :-)
This could be overly subjective as interpreting these kinds of words may differ subtly between individuals.
@@ -39,4 +47,12 @@ public DoRestoreEvent(int amount) { | |||
public int getAmount() { | |||
return amount; | |||
} | |||
|
|||
/** | |||
* Method to get the instigator of restoration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally I'd excuse setters & getters from Javadoc unless there is any potential for confusion somehow.
private int amount; | ||
|
||
/** | ||
* Constructor for creating the event. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another edge case: should plain constructors have javadoc? In this case maybe if the wording is a slight bit more meaningful (we already know by the constructors presence that it will create the event, so the text doesn't really add anything). I'm not sure if there's really any other meaning to add in this case.
No major code changes