/**
 * This function takes a list of entities and their corresponding activation
 * statuses. It removes all entities that have an activation status of false
 * and returns the modified list.
 *
 * @param entities A list of entities
 * @param activationStatus A list of activation statuses of entities (Boolean)
 * @return Modified list of entities after removing inactive entities
 *
 * Example:
 * entities = listOf("Player", "Enemy1", "Enemy2", "Boss")
 * activationStatus = listOf(true, false, true, false)
 * removeInactiveEntities(entities, activationStatus) // Output: ["Player", "Enemy2"]
 */
fun removeInactiveEntities(entities: List<String>, activationStatus: List<Boolean>): List<String> {

    // Create a new list to store the active entities
    val activeEntities = mutableListOf<String>()

    // Iterate over the entities and corresponding activation statuses
    for ((index, entity) in entities.withIndex()) {
        // Check if the entity is active (activation status is true)
        if (activationStatus[index]) {
            // Add the entity to the activeEntities list
            activeEntities.add(entity)
        }
    }

    // Return the modified list of activeEntities
    return activeEntities
}
/**
 * This function takes a list of entities and their corresponding activation
 * statuses. It removes all entities that have an activation status of false
 * and returns the modified list.
 *
 * @param entities A list of entities
 * @param activationStatus A list of activation statuses of entities (Boolean)
 * @return Modified list of entities after removing inactive entities
 *
 * Example:
 * entities = listOf("Player", "Enemy1", "Enemy2", "Boss")
 * activationStatus = listOf(true, false, true, false)
 * removeInactiveEntities(entities, activationStatus) // Output: ["Player", "Enemy2"]
 */
fun removeInactiveEntities(entities: List<String>, activationStatus: List<Boolean>): List<String> {
/**
 * This function takes a list of entities and their corresponding activation
 * statuses. It removes all entities that have an activation status of false
 * and returns the modified list.
 *
 * @param entities A list of entities
 * @param activationStatus A list of activation statuses of entities (Boolean)
 * @return Modified list of entities after removing inactive entities
 *
 * Example:
 * entities = listOf("Player", "Enemy1", "Enemy2", "Boss")
 * activationStatus = listOf(true, false, true, false)
 * removeInactiveEntities(entities, activationStatus) // Output: ["Player", "Enemy2"]
 */
fun removeInactiveEntities(entities: List<String>, activationStatus: List<Boolean>): List<String> {

    // Create a new list to store the active entities
    val activeEntities = mutableListOf<String>()

    // Iterate over the entities and corresponding activation statuses
    for ((index, entity) in entities.withIndex()) {
        // Check if the entity is active (activation status is true)
        if (activationStatus[index]) {
            // Add the entity to the activeEntities list
            activeEntities.add(entity)
        }
    }

    // Return the modified list of activeEntities
    return activeEntities
}