/**
 * This exercise checks if the dancer can move to a specific position (x, y) on the dance floor.
 *
 * @param dancer The name of the dancer.
 * @param x The x coordinate of the destination.
 * @param y The y coordinate of the destination.
 * @return True if the dancer can move to the given position, False otherwise.
 */
fun checkMovement(dancer: String, x: Int, y: Int): Boolean {

    val danceFloor = arrayOf(
        intArrayOf(1, 1, 1, 1, 1),
        intArrayOf(1, 1, 1, 1, 1),
        intArrayOf(1, 1, 1, 1, 1),
        intArrayOf(1, 1, 1, 1, 1),
        intArrayOf(1, 1, 1, 1, 1)
    )

    // Check if the dancer is out of the dance floor or if there is an obstacle at the destination
    if (x < 0 || y < 0 || x >= danceFloor.size || y >= danceFloor[0].size || danceFloor[x][y] == 0) {
        return false
    }

    // Check
    return true
}
/**
 * This exercise checks if the dancer can move to a specific position (x, y) on the dance floor.
 *
 * @param dancer The name of the dancer.
 * @param x The x coordinate of the destination.
 * @param y The y coordinate of the destination.
 * @return True if the dancer can move to the given position, False otherwise.
 */
fun checkMovement(dancer: String, x: Int, y: Int): Boolean {
/**
 * This exercise checks if the dancer can move to a specific position (x, y) on the dance floor.
 *
 * @param dancer The name of the dancer.
 * @param x The x coordinate of the destination.
 * @param y The y coordinate of the destination.
 * @return True if the dancer can move to the given position, False otherwise.
 */
fun checkMovement(dancer: String, x: Int, y: Int): Boolean {

    val danceFloor = arrayOf(
        intArrayOf(1, 1, 1, 1, 1),
        intArrayOf(1, 1, 1, 1, 1),
        intArrayOf(1, 1, 1, 1, 1),
        intArrayOf(1, 1, 1, 1, 1),
        intArrayOf(1, 1, 1, 1, 1)
    )

    // Check if the dancer is out of the dance floor or if there is an obstacle at the destination
    if (x < 0 || y < 0 || x >= danceFloor.size || y >= danceFloor[0].size || danceFloor[x][y] == 0) {
        return false
    }

    // Check
    return true
}