• Enoril@jlai.lu
    link
    fedilink
    arrow-up
    12
    arrow-down
    1
    ·
    edit-2
    3 months ago

    I don’t see the benefit of this long naming convention…

    It still allow bug to exist… like the fact that, with this code, the player can still play with 0 Hp.

    Should have been better to put a “if(health <= 0)” instead of “< 0”

    • joshfaulkner@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      3 months ago

      I asked this question on this post on a different instance, but would there be issues being that the code compares a float to integer zero “0”?

    • stockRot@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      3 months ago

      It sounds like the only concern you have with code is its bugginess, which is short sights. This is unfortunately better documented code than stuff I’ve seen in production. Obviously no one should do this, but let’s not act like there’s no benefit