/**
 * This function checks if the player's position collides with any enemy positions.
 *
 * @param playerPosition The current position of the player. It consists of two integers (x, y).
 * @param enemyPositions A list of enemy positions. Each position is represented as a tuple (x, y).
 * @return True if there is a collision, false if there is no collision.
 */
fun checkCollision(playerPosition: Pair<Int, Int>, enemyPositions: List<Pair<Int, Int>>): Boolean {

    for (enemyPosition in enemyPositions) {
        if (playerPosition.first == enemyPosition.first && playerPosition.second == enemyPosition.second) {
            return true
        }
    }
    return false
}
/**
 * This function checks if the player's position collides with any enemy positions.
 *
 * @param playerPosition The current position of the player. It consists of two integers (x, y).
 * @param enemyPositions A list of enemy positions. Each position is represented as a tuple (x, y).
 * @return True if there is a collision, false if there is no collision.
 */
fun checkCollision(playerPosition: Pair<Int, Int>, enemyPositions: List<Pair<Int, Int>>): Boolean {
/**
 * This function checks if the player's position collides with any enemy positions.
 *
 * @param playerPosition The current position of the player. It consists of two integers (x, y).
 * @param enemyPositions A list of enemy positions. Each position is represented as a tuple (x, y).
 * @return True if there is a collision, false if there is no collision.
 */
fun checkCollision(playerPosition: Pair<Int, Int>, enemyPositions: List<Pair<Int, Int>>): Boolean {

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