/**
 * Given a list of enemy positions and a range of attack, this function returns the number of enemies within the specified range.
 *
 * @param enemies A list of integers representing the positions of enemies.
 * @param minRange The minimum attack range.
 * @param maxRange The maximum attack range.
 * @return The number of enemies within the specified range.
 */
fun countEnemyInRange(enemies: List<Int>, minRange: Int, maxRange: Int): Int {

    val enemiesInRange = enemies.filter { it in minRange..maxRange }
    return enemiesInRange.size
}

// Example usage
/**
 * Given a list of enemy positions and a range of attack, this function returns the number of enemies within the specified range.
 *
 * @param enemies A list of integers representing the positions of enemies.
 * @param minRange The minimum attack range.
 * @param maxRange The maximum attack range.
 * @return The number of enemies within the specified range.
 */
fun countEnemyInRange(enemies: List<Int>, minRange: Int, maxRange: Int): Int {
/**
 * Given a list of enemy positions and a range of attack, this function returns the number of enemies within the specified range.
 *
 * @param enemies A list of integers representing the positions of enemies.
 * @param minRange The minimum attack range.
 * @param maxRange The maximum attack range.
 * @return The number of enemies within the specified range.
 */
fun countEnemyInRange(enemies: List<Int>, minRange: Int, maxRange: Int): Int {

    val enemiesInRange = enemies.filter { it in minRange..maxRange }
    return enemiesInRange.size
}

// Example usage