mediumStudy question · answer published in System Design interview questions, so no pointsgameplaydesign-patterns
Messy player code
Player code is full of flags like isJumping, isAttacking and isClimbing, causing bugs where two states run at once. What is a good refactor?
Discussion 0
Join free to post in the discussion.
Related questions
- Checking if the player is groundedGame Developer
- Godot signalsGame Developer
- Paying everyone in a loopBlockchain Developer
- Gatekeeper task for a shared UARTEmbedded Systems Engineer
- Lock-free ring buffer from ISR to taskEmbedded Systems Engineer
- Using timeouts on every blockEmbedded Systems Engineer
- Recovering from a lock order bugEmbedded Systems Engineer
- Active object design in an RTOSEmbedded Systems Engineer