I focused on these methods that you changed with an eye towards how those refactorings expose other opportunities. I surveyed both their callers and their callees
What is calling it:
- GetHexesForVanguard(Unit) -- GetRunMovesForReserveUnit(unit.owningPlayerId, unit, true)
- GetActionableHexesForReserveUnit(PTD, Unit, HS x3) -- GetRunMovesForReserveUnit(unit.owningPlayerId, unit, false)
What it is doing:
- playerId is irrelevant, both callers are just passing unit.owningPlayerId
- it actually contains logic to check vanguard and use 2 instead of actual walks
- its pulling in a set of start hexes from gm.ReservesForPlayer(playerId)
- so its effectively: (Unit, List) => List
- delegating actual generation of list to GetHexesInRange(playerId, ht, min, max, allTerrain, vanguard, vanguard)
What is calling it:
- GetActionableHexesForReserveUnit(PTD, Unit, HS x3) -- GetJumpMovesForReserveUnit(unit)
- MoveAction:DetermineMovementPathForReserveUnit(isVanguard, PTD) ??? -- GetJumpMovesForReserveUnit(unit)
What it is doing:
- also pulling in gm.ReservesForPlayer
- effectively making it (Unit, List) => List
- and delegating to GetHexesInRangeForJump(unit.owningPlayerId, ht, unit)
What is calling it:
- GetActionableHexesForReserveUnit(PTD, Unit, HS x3) -- GetInsertMovesForReserveUnit(unit.owningPlayerId, turnData)
- MoveAction:DetermineMovementPathForReserveUnit(isVanguard, PTD) -- GetInsertMovesForReserveUnit(baseData.playerId, turnData)
What it is doing:
- getting a list of potential source hexes from PlayersUnitsOnMap(playerId), similar to gm.ReservesForPlayer
- effectively List => List (no Unit bc dont need walks or runs or nuttin)
- uses HexMap.GetNeighbors(ht) and filters out hts with units or in reserves, nice
What is calling it:
- ONLY GetActionableHexesForReserveUnit (covered above)
What it is doing:
- does checking of whether or not a vanguard move can be made with that unit
- and then passes through to GetRunMovesForReserveUnit with a vanguard=true flag