private float GetFuturePortalScore(VirtualPortal virtualPortal) { float score = 0; return(score); }
private float GetVirtualPortalScore(VirtualPortal virtualPortal) { float distanceToEnemyCastleCircle = virtualPortal.location.Distance(Constants.Game.GetEnemyCastle().GetLocation()) - Constants.Game.CastleSize; if (distanceToEnemyCastleCircle > nearByDist) { return(0); } float score = (nearByDist - distanceToEnemyCastleCircle) / nearByDist; //the reason that we didn't just added 1 was to give higher priority to a closer place. //Still all the locations get near 1. By doing that we ensure to build 2 portals if there is enough mana and 2 elves are close to the castle return((score + 5) / 6); }