-
Notifications
You must be signed in to change notification settings - Fork 0
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
added the supervised interfaces #67
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.
You might want to consider providing some implementations for those interfaces.
Add documentation to your new classes and methods.
|
||
import com.flash3388.flashlib.control.Stoppable; | ||
|
||
public interface Supervisable extends Stoppable { |
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.
Supervisable
isn't the best name for it. I understand where it comes from, but saying supervision implies something completely different.
Maybe something around Limit
?
import com.flash3388.flashlib.control.Stoppable; | ||
import com.flash3388.flashlib.scheduling.Requirement; | ||
|
||
public interface SupervisedMovable extends Stoppable, Supervisable, Requirement { |
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.
You could just extend Movable
... You wouldn't need to provide the defaults in that case.
Do the same with the rest.
|
||
public interface SupervisedMovable extends Stoppable, Supervisable, Requirement { | ||
|
||
default void supervisedMove(double speed) { |
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.
It kinda sounds like it should almost be implicit (the idea that the motion is supervised), such that a call to move
is automatically supervised.
Remember that it's an interface, you don't actually need to provide all the capabilities in it with default
, simply require someone to implement it to your specifications.
Same for rest.
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.
I forgot to do it... I just copied them and didnt finish it lol
* | ||
* @since FlashLib 2.0.0 | ||
*/ | ||
public interface SupervisedMovable2D extends SupervisedMovable, Requirement { |
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.
You copied the documentation.... Fix it to something correct.
void move(Vector2 motionVector); | ||
|
||
@Override | ||
default void supervisedMove(double speed) { |
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.
Why do you re-do the default here?
Not sure about this one... close #66