-
Notifications
You must be signed in to change notification settings - Fork 44
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
Feature/training impl #458
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.
Copilot reviewed 5 out of 19 changed files in this pull request and generated 1 suggestion.
Files not reviewed (14)
- src/toniarts/openkeeper/game/controller/creature/CreatureController.java: Evaluated as low risk
- src/toniarts/openkeeper/game/component/TaskComponent.java: Evaluated as low risk
- src/toniarts/openkeeper/game/controller/room/TrainingRoomController.java: Evaluated as low risk
- src/toniarts/openkeeper/game/logic/CreatureExperienceSystem.java: Evaluated as low risk
- src/toniarts/openkeeper/game/logic/CreatureViewSystem.java: Evaluated as low risk
- src/toniarts/openkeeper/game/controller/GameController.java: Evaluated as low risk
- src/toniarts/openkeeper/game/state/MainMenuScreenController.java: Evaluated as low risk
- src/toniarts/openkeeper/game/task/worker/DigTileTask.java: Evaluated as low risk
- src/toniarts/openkeeper/utils/WorldUtils.java: Evaluated as low risk
- src/toniarts/openkeeper/view/text/CreatureTextParser.java: Evaluated as low risk
- src/toniarts/openkeeper/game/controller/room/AbstractRoomController.java: Evaluated as low risk
- src/toniarts/openkeeper/game/task/TaskType.java: Evaluated as low risk
- src/toniarts/openkeeper/game/controller/RoomControllerFactory.java: Evaluated as low risk
- src/toniarts/openkeeper/game/task/creature/Train.java: Evaluated as low risk
Comments skipped due to low confidence (1)
src/toniarts/openkeeper/game/task/AbstractTask.java:168
- Ensure that the method is covered by tests, especially the case where no accessible target is found.
protected Vector2f getAccessibleTargetNextToLocation(ICreatureController creature) {
* @param creature the creature trying to reach this | ||
* @return task location next to the wanted tile | ||
*/ | ||
protected Vector2f getAccessibleTargetNextToLocation(ICreatureController creature) { |
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.
The nested loop in this method is redundant and could lead to performance issues. Additionally, the method does not handle the case where no accessible target is found, returning null without any indication of failure.
protected Vector2f getAccessibleTargetNextToLocation(ICreatureController creature) { | |
protected Optional<Vector2f> getAccessibleTargetNextToLocation(ICreatureController creature) { |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
Allows creatures to train...
There is kinda duplicate time keeping for the training... It all kinda works. Task keeps check of validity and subtracts the money. ExperienceSystem then just deals with leveling the creature. Magically these systems are in sync as everything is executed sequentially. Not perhaps ideal but it conforms to our current design maybe the best...