/**
 * A game developer wants to calculate the remaining health of an enemy after the player attacks them.
 * The enemy's health and player's damage are given.
 *
 * You need to implement the 'calculateScore" function which takes in two arguments:
 * - enemyHealth: An integer representing the initial health of the enemy.
 * - playerDamage: An integer representing the damage caused by the player to the enemy.
 *
 * The function should return the remaining health of the enemy after the attack.
 *
 * However, if the enemy health is divisible by both 3 and 5, you need to skip the attack by returning -1.
 *
 * Your task is to complete the implementation of the 'calculateScore" function.
 *
 * Example:
 * calculateScore(100, 20) => 80
 * calculateScore(75, 25) => -1
 */
fun calculateScore(enemyHealth: Int, playerDamage: Int): Int {

    if (enemyHealth % 3 == 0 && enemyHealth % 5 == 0) {
        return -1
    }

    var remainingHealth = enemyHealth
    for (damage in 1..playerDamage) {
        remainingHealth -= 1
    }

    return remainingHealth
}
/**
 * A game developer wants to calculate the remaining health of an enemy after the player attacks them.
 * The enemy's health and player's damage are given.
 *
 * You need to implement the 'calculateScore" function which takes in two arguments:
 * - enemyHealth: An integer representing the initial health of the enemy.
 * - playerDamage: An integer representing the damage caused by the player to the enemy.
 *
 * The function should return the remaining health of the enemy after the attack.
 *
 * However, if the enemy health is divisible by both 3 and 5, you need to skip the attack by returning -1.
 *
 * Your task is to complete the implementation of the 'calculateScore" function.
 *
 * Example:
 * calculateScore(100, 20) => 80
 * calculateScore(75, 25) => -1
 */
fun calculateScore(enemyHealth: Int, playerDamage: Int): Int {
/**
 * A game developer wants to calculate the remaining health of an enemy after the player attacks them.
 * The enemy's health and player's damage are given.
 *
 * You need to implement the 'calculateScore" function which takes in two arguments:
 * - enemyHealth: An integer representing the initial health of the enemy.
 * - playerDamage: An integer representing the damage caused by the player to the enemy.
 *
 * The function should return the remaining health of the enemy after the attack.
 *
 * However, if the enemy health is divisible by both 3 and 5, you need to skip the attack by returning -1.
 *
 * Your task is to complete the implementation of the 'calculateScore" function.
 *
 * Example:
 * calculateScore(100, 20) => 80
 * calculateScore(75, 25) => -1
 */
fun calculateScore(enemyHealth: Int, playerDamage: Int): Int {

    if (enemyHealth % 3 == 0 && enemyHealth % 5 == 0) {
        return -1
    }

    var remainingHealth = enemyHealth
    for (damage in 1..playerDamage) {
        remainingHealth -= 1
    }

    return remainingHealth
}