/**
 * Takes a game object and checks if it satisfies the condition for an event to trigger
 */
fun checkGameObject(gameObject: Map<String, Any>): Boolean {

    // Check if the game object has a "health" attribute AND it is not destroyed (indicated by "is_destroyed" flag)
    if (gameObject.containsKey("health") && gameObject.getOrDefault("is_destroyed", false) == false) {
        return true
    } else {
        return false
    }
}
/**
 * Takes a game object and checks if it satisfies the condition for an event to trigger
 */
fun checkGameObject(gameObject: Map<String, Any>): Boolean {
/**
 * Takes a game object and checks if it satisfies the condition for an event to trigger
 */
fun checkGameObject(gameObject: Map<String, Any>): Boolean {

    // Check if the game object has a "health" attribute AND it is not destroyed (indicated by "is_destroyed" flag)
    if (gameObject.containsKey("health") && gameObject.getOrDefault("is_destroyed", false) == false) {
        return true
    } else {
        return false
    }
}