Skip to content
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

WalkingQueue redesign #186

Open
notjuanortiz opened this issue Dec 4, 2019 · 2 comments
Open

WalkingQueue redesign #186

notjuanortiz opened this issue Dec 4, 2019 · 2 comments
Labels
average An issue that is neither hard nor easy to resolve. medium priority An issue that can be resolved whenever, but is guaranteed to be completed.
Milestone

Comments

@notjuanortiz
Copy link
Contributor

No description provided.

@notjuanortiz
Copy link
Contributor Author

The WalkingQueue class does not test well due to the level of cognitive complexity of many methods within the class, which breaks a few SOLID principles.

A redesign of the class is necessary if we want to extend the functionality of mobile entities, without introducing more unstable code.

The current functionalities encompassed within this class include:

  • Determine the walking direction
  • Determine the running direction
  • Calculating run-energy depletion based on a player's weight
  • Calculating run-energy regeneration based on a player's agility level
  • Monitoring a player's run-energy
  • Prevents movement (incompleted)

@lare96 lare96 added average An issue that is neither hard nor easy to resolve. medium priority An issue that can be resolved whenever, but is guaranteed to be completed. labels Dec 5, 2019
@lare96 lare96 added this to the v0.5 milestone Dec 5, 2019
@notjuanortiz notjuanortiz changed the title WalkingQueue needs a test suite WalkingQueue redesign Dec 8, 2019
@notjuanortiz
Copy link
Contributor Author

notjuanortiz commented Dec 8, 2019

To differentiate between walking and running, the best approach IMO would be to make use of the State Object design pattern. This also allows us to easily implement other movement states, such as Stunned, Frozen, and Snared, without having to modifying existing states (in theory).

@lare96 lare96 modified the milestones: v0.5, v1.0 Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
average An issue that is neither hard nor easy to resolve. medium priority An issue that can be resolved whenever, but is guaranteed to be completed.
Projects
None yet
Development

No branches or pull requests

2 participants