BenEklundCS / The-Land-of-Boars

A platformer game in C++ and Raylib!
1 stars 0 forks source link

Reduce nested complexity of PlatformCollision methods #2

Closed BenEklundCS closed 1 month ago

BenEklundCS commented 1 month ago

In the Player and Monster classes, I have independently implemented PlatformCollision logic the GameStateManager calls to handle collisions.

  1. This should be abstracted into shared logic for both classes
  2. The deep nested complexity issue CodeScene detects on the Player::PlatformCollision method should be resolved
BenEklundCS commented 1 month ago

Completed 1. https://github.com/BenEklundCS/The-Land-of-Boars/commit/60b1624e07e46fa32a28102163b5e97e6725ff1c

Reviewing CodeScene to see what it thinks about the deep/nested complexity

BenEklundCS commented 1 month ago

Code health drastically improved from this refactor to above a 9/10 - closing this issue here as I don't see need to refactor the CollisionHandler right now.