How much a candidate at distance loses for being inside a keepAway radius: 0 when there is no
radius or the candidate is outside it, otherwise the shortfall as a negative score.
Parameters
distance: number
keepAway: number
Returns number
Example
import { keepAwayScore } from'@datamoc/mwg/ai';
console.log(keepAwayScore(1, 3)); // -2, two tiles inside the radius console.log(keepAwayScore(5, 3)); // 0, outside it
How much a candidate at
distanceloses for being inside akeepAwayradius: 0 when there is no radius or the candidate is outside it, otherwise the shortfall as a negative score.