/// <summary> /// Compute score for attacking a target. /// </summary> /// <param name="sceneContext">The RockSceneContext</param> /// <param name="sourceRockId">The RockId of attacker</param> /// <param name="targetRockId">The RockId of target</param> /// <returns>The score in double</returns> private static double ScoreForMinionAttackHero(RockSceneContext sceneContext, int sourceRockId, int targetRockId) { var targetHero = sceneContext.GetRockHero(targetRockId); var sourceMinion = sceneContext.GetRockMinion(sourceRockId); double score = 4d; bool canKill = sourceMinion.Damage >= targetHero.Health; if (canKill) { score += 4; } else { score += sourceMinion.Damage; } return(score); }