Basic job implementation #5

Merged
erns6604 merged 10 commits from player into main 2025-10-17 10:06:38 +02:00
Owner

This change also introduce a few new interfaces for everyone to use.

Action
Actor

are related, an actor can perform an action. They can be tacked on to anything that should be able to perform an action and provides the performAction method.
An action should be a class that takes all the information it needs to exectue in its constructor.

HasJob

is an interface for anyone that has a job. This allows you to get the job from the class, and since each job can perform an action you can pass actions into jobs.

This change also introduce a few new interfaces for everyone to use. Action Actor are related, an actor can perform an action. They can be tacked on to anything that should be able to perform an action and provides the performAction method. An action should be a class that takes all the information it needs to exectue in its constructor. HasJob is an interface for anyone that has a job. This allows you to get the job from the class, and since each job can perform an action you can pass actions into jobs.
erns6604 added 10 commits 2025-10-17 10:06:27 +02:00
Steps 1 and 2 TDD.
Written a test and made it pass.
This is most definitely not the best solution.

I would like to know how to handle cases where I think Job should be abstract further down the line. How is this handled in TDD?
# Conflicts:
#	src/main/java/Movable.java
#	src/main/java/Player.java
#	src/test/java/PlayerTest.java
erns6604 merged commit 7048d66628 into main 2025-10-17 10:06:38 +02:00
Sign in to join this conversation.
No Reviewers
No Label
No Milestone
No project
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: erns6604/rwrg#5
No description provided.