From 3ba1110789cd6f422233338e893d263497e70128 Mon Sep 17 00:00:00 2001 From: "maria.ruiz" <zs22016128@estudiantes.uv.mx> Date: Sun, 9 Mar 2025 22:23:38 +0000 Subject: [PATCH] Eliminar Interfaz/scripst/Artista2.js --- Interfaz/scripst/Artista2.js | 50 ------------------------------------ 1 file changed, 50 deletions(-) delete mode 100644 Interfaz/scripst/Artista2.js diff --git a/Interfaz/scripst/Artista2.js b/Interfaz/scripst/Artista2.js deleted file mode 100644 index a735ae3..0000000 --- a/Interfaz/scripst/Artista2.js +++ /dev/null @@ -1,50 +0,0 @@ - -const filas = 10; -const columnas = 12; -let diaSeleccionado = 23; -const asientosVendidos = { 5: new Set(), 6: new Set(), 7: new Set() }; -let asientosSeleccionados = new Set(); - -function seleccionarDia(dia) { - diaSeleccionado = dia; - asientosSeleccionados.clear(); - document.querySelectorAll('.dias button').forEach(btn => btn.classList.remove('selected')); - event.target.classList.add('selected'); - renderizarAsientos(); -} - -function toggleAsiento(asiento) { - if (asientosVendidos[diaSeleccionado].has(asiento)) return; - if (asientosSeleccionados.has(asiento)) { - asientosSeleccionados.delete(asiento); - } else { - asientosSeleccionados.add(asiento); - } - renderizarAsientos(); -} - -function venderAsientos() { - asientosSeleccionados.forEach(asiento => asientosVendidos[diaSeleccionado].add(asiento)); - asientosSeleccionados.clear(); - renderizarAsientos(); -} - -function renderizarAsientos() { - const contenedor = document.getElementById('asientos'); - contenedor.innerHTML = ''; - for (let i = 0; i < filas * columnas; i++) { - const asiento = `${Math.floor(i / columnas) + 1}${String.fromCharCode(65 + (i % columnas))}`; - const boton = document.createElement('button'); - boton.className = 'asiento'; - if (asientosVendidos[diaSeleccionado].has(asiento)) { - boton.classList.add('vendido'); - } else if (asientosSeleccionados.has(asiento)) { - boton.style.backgroundColor = 'orange'; - } - boton.textContent = asiento; - boton.onclick = () => toggleAsiento(asiento); - contenedor.appendChild(boton); - } -} - -renderizarAsientos();