/**
 * Given a list of objects and the player's current position, this function checks if the player
 * collides with any object, and returns true if a collision occurs and false otherwise.
 *
 * @param objects A list of object positions represented as pairs of (x, y) coordinates.
 * @param playerPosition The player's current position represented as a pair of (x, y) coordinates.
 * @return true if the player collides with any object, false otherwise.
 */
fun checkCollisions(objects: List<Pair<Int, Int>>, playerPosition: Pair<Int, Int>): Boolean {

    for (objectPosition in objects) {
        if (objectPosition.first == playerPosition.first && objectPosition.second == playerPosition.second) {
            return true
        }
    }
    return false
}
/**
 * Given a list of objects and the player's current position, this function checks if the player
 * collides with any object, and returns true if a collision occurs and false otherwise.
 *
 * @param objects A list of object positions represented as pairs of (x, y) coordinates.
 * @param playerPosition The player's current position represented as a pair of (x, y) coordinates.
 * @return true if the player collides with any object, false otherwise.
 */
fun checkCollisions(objects: List<Pair<Int, Int>>, playerPosition: Pair<Int, Int>): Boolean {
/**
 * Given a list of objects and the player's current position, this function checks if the player
 * collides with any object, and returns true if a collision occurs and false otherwise.
 *
 * @param objects A list of object positions represented as pairs of (x, y) coordinates.
 * @param playerPosition The player's current position represented as a pair of (x, y) coordinates.
 * @return true if the player collides with any object, false otherwise.
 */
fun checkCollisions(objects: List<Pair<Int, Int>>, playerPosition: Pair<Int, Int>): Boolean {

    for (objectPosition in objects) {
        if (objectPosition.first == playerPosition.first && objectPosition.second == playerPosition.second) {
            return true
        }
    }
    return false
}