import { AttackType , getDelta , TileCoordinates } from "@creature-chess/models" ; export const inAttackRange = ( attacker , target , attackType ) => { const { x : deltaX , y : deltaY } = getDelta ( attacker , target ) ; const result = ( Math . min ( deltaX , deltaY ) === 0 && Math . max ( deltaX , deltaY ) <= attackType . range ) ; return result ; } ;