HomeWildfire Games

UnitMotion - Split Move() into several functions

Description

UnitMotion - Split Move() into several functions

Move() is generally 4 parts:

  • Moving
  • Updating our state
  • Handling obstructed moves
  • Checking if we are at destination.

These can all be put in their own functions, clarifying logic and making it harder to make mistakes.

Differential Revision: https://code.wildfiregames.com/D1897