/**
 * Given the player's position in a game, return true if the player is in a safe area,
 * else return false.
 *
 * @param position A pair representing the player's position in (x, y) coordinates.
 * @return true if the player is in a safe area, false otherwise.
 */
fun checkPlayerPosition(position: Pair<Int, Int>?): Boolean {

    // Check if the player is outside the game boundaries
    if (position == null) {
        return false
    }

    // Check if the player is in a safe area
    val safeAreas = listOf(Pair(10, 10), Pair(20, 20), Pair(30, 30))  // Example safe areas
    return position in safeAreas
}
/**
 * Given the player's position in a game, return true if the player is in a safe area,
 * else return false.
 *
 * @param position A pair representing the player's position in (x, y) coordinates.
 * @return true if the player is in a safe area, false otherwise.
 */
fun checkPlayerPosition(position: Pair<Int, Int>?): Boolean {
/**
 * Given the player's position in a game, return true if the player is in a safe area,
 * else return false.
 *
 * @param position A pair representing the player's position in (x, y) coordinates.
 * @return true if the player is in a safe area, false otherwise.
 */
fun checkPlayerPosition(position: Pair<Int, Int>?): Boolean {

    // Check if the player is outside the game boundaries
    if (position == null) {
        return false
    }

    // Check if the player is in a safe area
    val safeAreas = listOf(Pair(10, 10), Pair(20, 20), Pair(30, 30))  // Example safe areas
    return position in safeAreas
}