tag:blogger.com,1999:blog-30610225415080446242024-03-19T01:09:55.808-07:00La Settina D'oroSimulazione del metodoUnknownnoreply@blogger.comBlogger60125tag:blogger.com,1999:blog-3061022541508044624.post-68825978777363426812024-02-10T06:40:00.000-08:002024-02-10T06:40:25.298-08:00prono over<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pronosticatore Over/Under/Mg by Robj</title>
<style>
body {
background-color: #f0f0f0; /* Grigio Chiaro */
color: black;
font-family: Arial, sans-serif;
}
form {
margin-bottom: 20px;
}
label {
color: #00008b; /* Blu Scuro */
}
#loading {
display: none;
color: black;
animation: blinker 1s linear infinite;
}
#pronostici {
color: black;
}
#calcButton {
background-color: #00008b; /* Blu Scuro */
color: white;
}
#resetButton {
background-color: #800000; /* Rosso Scuro */
color: white;
}
@keyframes blinker {
50% {
opacity: 0;
}
}
#followText {
color: black;
display: none;
}
#blogLink, #telegramLink {
color: #00008b; /* Blu Scuro */
font-weight: bold;
text-decoration: none;
}
#pronostici b {
font-weight: bold;
font-size: larger;
}
#info {
margin-bottom: 20px;
color: black; /* Modifica per rendere il testo nero */
}
#revisedText {
display: none;
animation: blinker 1s linear infinite;
}
</style>
</head>
<body>
<div id="info">
<label for="dataOra" style="color: black;"><b>Data e ora:</b></label> <!-- Modifica per rendere il testo nero -->
<input type="text" id="dataOra" style="color: black;"><br> <!-- Modifica per rendere il testo nero -->
<label for="squadraCasa" style="color: black;"><b>Squadra di casa:</b></label> <!-- Modifica per rendere il testo nero -->
<input type="text" id="squadraCasa" style="color: black;"><br> <!-- Modifica per rendere il testo nero -->
<label for="squadraOspite" style="color: black;"><b>Squadra ospite:</b></label> <!-- Modifica per rendere il testo nero -->
<input type="text" id="squadraOspite" style="color: black;"><br> <!-- Modifica per rendere il testo nero -->
</div>
<h1>Pronosticatore Over/Under/Multigoal by Robj</h1>
<form id="calcForm">
<label for="mediaGoalCasa"><b>Media Goal squadra di casa (totale):</b></label>
<input type="number" id="mediaGoalCasa" step="0.01" required><br>
<br/>
<label for="goalSegnatiCasa"><b>Goal segnati squadra casa (in casa, ultimi 5 match):</b></label>
<input type="number" id="goalSegnatiCasa" required><br>
<br/>
<label for="goalSubitiCasa"><b>Goal subiti squadra casa (in casa, ultimi 5 match):</b></label>
<input type="number" id="goalSubitiCasa" required><br>
<br/>
<br/>
<label for="mediaGoalOspite" style="color: #800020;"><b>Media Goal squadra ospite (totale):</b></label>
<input type="number" id="mediaGoalOspite" step="0.01" required><br>
<br/>
<label for="goalSegnatiOspite" style="color: #800020;"><b>Goal segnati squadra ospite (fuoricasa, ultimi 5 match):</b></label>
<input type="number" id="goalSegnatiOspite" required><br>
<br/>
<label for="goalSubitiOspite" style="color: #800020;"><b>Goal subiti squadra ospite (fuoricasa, ultimi 5 match):</b></label>
<input type="number" id="goalSubitiOspite" required><br>
<br/>
<button type="button" id="calcButton" onclick="calcolaPronostico()">Calcola Pronostico</button>
<button type="button" id="resetButton" onclick="resetForm()">Cancella Dati</button>
</form>
<p id="loading">Attendere prego, elaborazione in corso...</p>
<p id="pronostici" style="display:none;"></p>
<p id="followText">Seguimi su <a id="blogLink" href="https://betting-maker.blogspot.com/">Bettingmaker</a>, e su <a id="telegramLink" href="https://t.me/+WWSoVbv7aAIuMp3t">Telegram</a></p>
<p id="revisedText" style="display:none;">Per rielaborare un nuovo pronostico è necessario cancellare prima i dati.</p>
<script>
function calcolaPronostico() {
document.getElementById('loading').style.display = 'block';
setTimeout(function() {
var mediaGoalCasa = parseFloat(document.getElementById('mediaGoalCasa').value);
var goalSegnatiCasa = parseInt(document.getElementById('goalSegnatiCasa').value);
var goalSubitiCasa = parseInt(document.getElementById('goalSubitiCasa').value);
var mediaGoalOspite = parseFloat(document.getElementById('mediaGoalOspite').value);
var goalSegnatiOspite = parseInt(document.getElementById('goalSegnatiOspite').value);
var goalSubitiOspite = parseInt(document.getElementById('goalSubitiOspite').value);
var k1 = (((goalSegnatiCasa + goalSubitiOspite) / 2) + ((goalSegnatiOspite + goalSubitiCasa) / 2)) / 5;
var media = (mediaGoalCasa + mediaGoalOspite) / 2;
var mediaTotale = (k1 + media) / 2;
var pronostico1 = '';
var pronostico2 = '';
if (k1 <= 1.5) {
pronostico1 = '<span style="color: #8B4513;">Multigoal 1-2</span>';
} else if (k1 >= 1.51 && k1 <= 2) {
pronostico1 = '<span style="color: #8B4513;">Multigoal 1-3</span>';
} else if ((k1 >= 2.01 && k1 < 2.4) || (k1 >= 2.4 && k1 <= 2.59)) {
pronostico1 = '<span style="color: #8B4513;">Multigoal 1-3</span>';
} else if (k1 > 3 && mediaTotale > 2.75 && mediaTotale < 3.1) {
pronostico1 = '<span style="color: #8B4513;">Multigoal 2-3</span>';
} else if (k1 > 3 && mediaTotale >= 3.1 && mediaTotale < 3.3) {
pronostico1 = '<span style="color: #8B4513;">Multigoal 2-4</span>';
} else if (k1 > 3 && mediaTotale >= 3.3) {
pronostico1 = '<span style="color: #8B4513;">Multigoal 3-5</span>';
} else {
pronostico1 = '<span style="color: #8B4513;">No bet</span>'; // Aggiunta opzione "No bet"
}
if (k1 >= 2.01 && k1 <= 2.29) {
pronostico2 = '<span style="color: green;">Over 1,5</span>';
} else if (k1 >= 2.30 && k1 <= 2.59) {
pronostico2 = '<span style="color: #FF8C00;">Under 3,5</span>';
} else if (k1 >= 3 && mediaTotale > 3.10) {
pronostico2 = '<span style="color: green;">Over 2,5</span>';
}
var pronostici = '';
if (pronostico1 && pronostico2) {
pronostici = '<b>' + pronostico1 + '<br>' + pronostico2 + '</b>';
} else if (pronostico1 || pronostico2) {
pronostici = '<b>' + pronostico1 || pronostico2 + '</b>';
} else {
pronostici = '<b>No bet</b>';
}
document.getElementById('loading').style.display = 'none';
document.getElementById('pronostici').innerHTML = pronostici;
document.getElementById('pronostici').style.display = 'block';
document.getElementById('followText').style.display = 'block';
setTimeout(function() {
document.getElementById('followText').style.display = 'none';
}, 12000); // 12 secondi
setTimeout(function() {
document.getElementById('pronostici').style.display = 'none';
document.getElementById('revisedText').style.display = 'block';
setTimeout(function() {
document.getElementById('revisedText').style.display = 'none';
}, 4000); // 4 secondi
}, 12000); // 12 secondi
}, 5000);
}
function resetForm() {
document.getElementById("calcForm").reset();
document.getElementById('dataOra').value = ''; // Cancella la data e l'ora
document.getElementById('squadraCasa').value = ''; // Cancella il nome della squadra di casa
document.getElementById('squadraOspite').value = ''; // Cancella il nome della squadra ospite
document.getElementById('pronostici').innerHTML = '';
document.getElementById('pronostici').style.display = 'none';
document.getElementById('followText').style.display = 'none';
document.getElementById('revisedText').style.display = 'none';
}
</script>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-43571813645561838192024-02-08T13:29:00.000-08:002024-02-08T15:21:34.632-08:00next over<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Next Over Calculator</title>
<style>
#loadingText {
color: black;
font-weight: bold;
animation: blinker 1s linear infinite;
}
@keyframes blinker {
50% {
opacity: 0;
}
}
#predictionResult {
display: none;
}
/* Aggiunta di stili per i pulsanti */
button {
padding: 10px 20px;
border: none;
cursor: pointer;
border-radius: 5px;
margin-right: 10px;
}
/* Stile per il pulsante "Pronostica Goal" */
button#predictButton {
background-color: red;
color: white;
}
/* Stile per il pulsante "Cancella Dati" */
button#clearButton {
background-color: blue;
color: white;
}
</style>
</head>
<body>
<h1>Pronostico Goal</h1>
<form id="predictionForm">
<div class="row">
<label class="label" for="match">Partita:</label>
<input type="text" id="match" name="match" required>
</div>
<div class="row">
<label class="label" for="date">Data:</label>
<input type="date" id="date" name="date" required>
</div>
<div class="row">
<label class="label" for="time">Ora:</label>
<input type="time" id="time" name="time" required>
</div>
<div class="row">
<label class="label" for="minute">Minuto match:</label>
<input type="number" id="minute" name="minute" required>
</div>
<div class="row">
<div>
<label for="homeAttacks">Attacchi squadra casa:</label>
<input type="number" id="homeAttacks" name="homeAttacks" required>
</div>
<div>
<label for="awayAttacks">Attacchi squadra ospite:</label>
<input type="number" id="awayAttacks" name="awayAttacks" required>
</div>
</div>
<div class="row">
<div>
<label for="homeDangerousAttacks">Attacchi pericolosi squadra casa:</label>
<input type="number" id="homeDangerousAttacks" name="homeDangerousAttacks" required>
</div>
<div>
<label for="awayDangerousAttacks">Attacchi pericolosi squadra ospite:</label>
<input type="number" id="awayDangerousAttacks" name="awayDangerousAttacks" required>
</div>
</div>
<div class="row">
<label class="label" for="homeShots">Tiri squadra casa:</label>
<input type="number" id="homeShots" name="homeShots" required>
</div>
<div class="row">
<label class="label" for="awayShots">Tiri squadra ospite:</label>
<input type="number" id="awayShots" name="awayShots" required>
</div>
<div class="row">
<label class="label" for="homeCorners">Angoli squadra casa:</label>
<input type="number" id="homeCorners" name="homeCorners" required>
</div>
<div class="row">
<label class="label" for="awayCorners">Angoli squadra ospite:</label>
<input type="number" id="awayCorners" name="awayCorners" required>
</div>
<div class="row">
<label class="label" for="odds1">Quota segno 1 Pre-Match:</label>
<input type="number" step="0.01" id="odds1" name="odds1" required>
</div>
<div class="row">
<label class="label" for="odds2">Quota segno 2 Pre-Match:</label>
<input type="number" step="0.01" id="odds2" name="odds2" required>
</div>
<div class="row">
<label class="label" for="over25Odds">Quota over 2,5 pre-match:</label>
<input type="number" step="0.01" id="over25Odds" name="over25Odds" required>
</div>
<br>
<div class="row">
<button type="button" id="predictButton" onclick="predictGoal()">Pronostica Goal</button>
<button type="button" id="clearButton" onclick="clearData()">Cancella Dati</button>
</div>
</form>
<p id="loadingText">Attendere il pronostico...</p>
<p id="predictionResult"></p>
<script>
function predictGoal() {
document.getElementById('loadingText').style.display = 'block';
document.getElementById('predictionResult').innerHTML = '';
document.getElementById('predictionResult').style.display = 'none';
setTimeout(function() {
var match = document.getElementById('match').value;
var date = document.getElementById('date').value;
var time = document.getElementById('time').value;
var minute = parseInt(document.getElementById('minute').value);
var homeAttacks = parseInt(document.getElementById('homeAttacks').value);
var awayAttacks = parseInt(document.getElementById('awayAttacks').value);
var homeDangerousAttacks = parseInt(document.getElementById('homeDangerousAttacks').value);
var awayDangerousAttacks = parseInt(document.getElementById('awayDangerousAttacks').value);
var homeShots = parseInt(document.getElementById('homeShots').value);
var awayShots = parseInt(document.getElementById('awayShots').value);
var homeCorners = parseInt(document.getElementById('homeCorners').value);
var awayCorners = parseInt(document.getElementById('awayCorners').value);
var odds1 = parseFloat(document.getElementById('odds1').value);
var odds2 = parseFloat(document.getElementById('odds2').value);
var over25Odds = parseFloat(document.getElementById('over25Odds').value);
if (minute < 65) {
document.getElementById('predictionResult').innerHTML = "<span style='color: red; font-weight: bold;'>Inserisci i dati a partire dal minuto 65.</span>";
document.getElementById('predictionResult').style.display = 'block';
document.getElementById('loadingText').style.display = 'none';
return;
}
if (over25Odds >= 1.8) {
document.getElementById('predictionResult').innerHTML = "<span style='color: blue; font-weight: bold;'>Pronostico: Non verrà segnato un goal (quota over 2,5 pre-match troppo alta).</span>";
document.getElementById('predictionResult').style.display = 'block';
document.getElementById('loadingText').style.display = 'none';
return;
}
var sumAttacks = homeAttacks + awayAttacks;
var sumDangerousAttacks = homeDangerousAttacks + awayDangerousAttacks;
var sumShots = homeShots + awayShots;
var sumCorners = homeCorners + awayCorners;
var ballSpeed = (sumAttacks + sumDangerousAttacks) / minute;
var result = "";
if (sumAttacks > (minute * 1.95) &&
sumDangerousAttacks > minute &&
sumShots > 6.5 &&
sumCorners > 5 &&
(odds1 < 1.65 || odds2 < 1.65) &&
ballSpeed > 2.65) {
result = "<span style='color: red; font-weight: bold;'>Pronostico: Verrà segnato un goal!</span>";
} else {
result = "<span style='color: blue; font-weight: bold;'>Pronostico: Non verrà segnato un goal.</span>";
}
document.getElementById('loadingText').style.display = 'none';
document.getElementById('predictionResult').innerHTML = result;
document.getElementById('predictionResult').style.display = 'block';
}, 6000);
}
function clearData() {
document.getElementById('predictionForm').reset();
document.getElementById('predictionResult').innerHTML = '';
document.getElementById('predictionResult').style.display = 'none';
}
</script>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-82855740685416675702024-02-08T11:10:00.000-08:002024-02-08T13:06:30.696-08:00aggio<!DOCTYPE html>
<html>
<head>
<title><i>Calcolatore by Robj</i></title>
<style>
.positive {
color: green;
font-weight: bold;
}
.negative {
color: red;
font-weight: bold;
}
.positive-message {
color: blue;
font-style: italic;
}
.red-button {
background-color: red;
color: white;
}
.green-button {
background-color: green;
color: white;
}
</style>
<script>
function calcola() {
var q1 = parseFloat(document.getElementById("q1").value);
var q2 = parseFloat(document.getElementById("q2").value);
var q3 = parseFloat(document.getElementById("q3").value);
var b4 = parseInt(document.getElementById("b4").value);
var b5 = parseInt(document.getElementById("b5").value);
var b6 = parseInt(document.getElementById("b6").value);
var c4 = parseInt(document.getElementById("c4").value);
var c5 = parseInt(document.getElementById("c5").value);
var c6 = parseInt(document.getElementById("c6").value);
var totale = b4 + b5 + b6 + c4 + c5 + c6;
var percentuale1 = ((b4 + c6) / totale) * 100;
var percentualex = ((b5 + c5) / totale) * 100;
var percentuale2 = ((b6 + c4) / totale) * 100;
var aggio = (((100 / q1) + (100 / q2) + (100 / q3)) - 100)/100;
var quotaReale1 = (100 - aggio) / percentuale1;
var quotaRealex = (100 - aggio) / percentualex;
var quotaReale2 = (100 - aggio) / percentuale2;
var valore1 = quotaReale1.toFixed(2);
var valorex = quotaRealex.toFixed(2);
var valore2 = quotaReale2.toFixed(2);
document.getElementById("percentuale1").innerHTML = percentuale1.toFixed(2) + "%";
document.getElementById("percentualex").innerHTML = percentualex.toFixed(2) + "%";
document.getElementById("percentuale2").innerHTML = percentuale2.toFixed(2) + "%";
document.getElementById("aggio").innerHTML = (aggio * 100).toFixed(2) + "%";
document.getElementById("quotaReale1").innerHTML = valore1;
document.getElementById("quotaRealex").innerHTML = valorex;
document.getElementById("quotaReale2").innerHTML = valore2;
var quota1Diff = ((q1/quotaReale1) * 100) -100;
var quotaXDiff = ((q2/quotaRealex) * 100) -100;
var quota2Diff = ((q3/quotaReale2) * 100) - 100;
var quota1Element = document.getElementById("quota1");
var quotaXElement = document.getElementById("quotaX");
var quota2Element = document.getElementById("quota2");
quota1Element.innerHTML = quota1Diff.toFixed(2) + "%";
quotaXElement.innerHTML = quotaXDiff.toFixed(2) + "%";
quota2Element.innerHTML = quota2Diff.toFixed(2) + "%";
quota1Element.classList.remove("positive", "negative");
quotaXElement.classList.remove("positive", "negative");
quota2Element.classList.remove("positive", "negative");
if (quota1Diff > 0) {
quota1Element.classList.add("positive");
quota1Element.innerHTML += "<br><span class='positive-message'>Questa quota è pagata bene in rapporto alla probabilità che si verifichi l'evento.</span>";
} else if (quota1Diff < 0) {
quota1Element.classList.add("negative");
}
if (quotaXDiff > 0) {
quotaXElement.classList.add("positive");
quotaXElement.innerHTML += "<br><span class='positive-message'>Questa quota è pagata bene in rapporto alla probabilità che si verifichi l'evento.</span>";
} else if (quotaXDiff < 0) {
quotaXElement.classList.add("negative");
}
if (quota2Diff > 0) {
quota2Element.classList.add("positive");
quota2Element.innerHTML += "<br><span class='positive-message'>Questa quota è pagata bene in rapporto alla probabilità che si verifichi l'evento.</span>";
} else if (quota2Diff < 0) {
quota2Element.classList.add("negative");
}
var pronosticoElement = document.getElementById("pronostico");
if (percentuale1 < percentualex && percentualex < percentuale2 &&
quotaReale1 < quotaRealex && quotaRealex < quotaReale2) {
pronosticoElement.innerHTML = "1";
} else if (percentuale2 < percentualex && percentualex < percentuale1 &&
quotaReale2 < quotaRealex && quotaRealex < quotaReale1) {
pronosticoElement.innerHTML = "2";
} else {
pronosticoElement.innerHTML = "No Bet";
}
}
function cancellaDati() {
document.getElementById("partita").value = "";
document.getElementById("q1").value = "";
document.getElementById("q2").value = "";
document.getElementById("q3").value = "";
document.getElementById("b4").value = "";
document.getElementById("b5").value = "";
document.getElementById("b6").value = "";
document.getElementById("c4").value = "";
document.getElementById("c5").value = "";
document.getElementById("c6").value = "";
// Resetta i risultati
document.getElementById("percentuale1").innerHTML = "";
document.getElementById("percentualex").innerHTML = "";
document.getElementById("percentuale2").innerHTML = "";
document.getElementById("aggio").innerHTML = "";
document.getElementById("quotaReale1").innerHTML = "";
document.getElementById("quotaRealex").innerHTML = "";
document.getElementById("quotaReale2").innerHTML = "";
document.getElementById("quota1").innerHTML = "";
document.getElementById("quotaX").innerHTML = "";
document.getElementById("quota2").innerHTML = "";
// Rimuovi le classi positive/negative dai risultati precedenti
document.getElementById("quota1").classList.remove("positive", "negative");
document.getElementById("quotaX").classList.remove("positive", "negative");
document.getElementById("quota2").classList.remove("positive", "negative");
}
</script>
</head>
<body>
<h1><i>Calcolatore by Robj</i></h1>
<form>
<label for="partita">Partita:</label>
<input type="text" id="partita" name="partita"><br><br>
<label for="q1">Quote segno 1:</label>
<input type="number" step="0.01" id="q1" name="q1"><br>
<label for="q2">Quote segno X:</label>
<input type="number" step="0.01" id="q2" name="q2"><br>
<label for="q3">Quote segno 2:</label>
<input type="number" step="0.01" id="q3" name="q3"><br><br>
<label for="b4">Partite vinte in casa sq. di casa:</label>
<input type="number" id="b4" name="b4"><br>
<label for="b5">Partite pareggiate in casa sq. di casa:</label>
<input type="number" id="b5" name="b5"><br>
<label for="b6">Partite perse in casa sq. di casa:</label>
<input type="number" id="b6" name="b6"><br><br>
<label for="c4">Partite vinte fuori casa sq. ospite:</label>
<input type="number" id="c4" name="c4"><br>
<label for="c5">Partite pareggiate fuori casa sq. ospite:</label>
<input type="number" id="c5" name="c5"><br>
<label for="c6">Partite perse fuori casa sq. ospite:</label>
<input type="number" id="c6" name="c6"><br><br>
<input type="button" value="Calcola" onclick="calcola()" class="green-button">
<input type="button" value="Cancella dati" onclick="cancellaDati()" class="red-button"><br><br>
<label for="percentuale1">Percentuale segno 1:</label>
<span id="percentuale1"></span><br>
<label for="percentualex">Percentuale segno X:</label>
<span id="percentualex"></span><br>
<label for="percentuale2">Percentuale segno 2:</label>
<span id="percentuale2"></span><br>
<label for="aggio">Aggio:</label>
<span id="aggio"></span><br>
<label for="quotaReale1">Quota reale 1:</label>
<span id="quotaReale1"></span><br>
<label for="quotaRealex">Quota reale X:</label>
<span id="quotaRealex"></span><br>
<label for="quotaReale2">Quota reale 2:</label>
<span id="quotaReale2"></span><br>
<label for="quota1">Differenza quota 1:</label>
<span id="quota1"></span><br>
<label for="quotaX">Differenza quota X:</label>
<span id="quotaX"></span><br>
<label for="quota2">Differenza quota 2:</label>
<span id="quota2"></span><br>
<label for="pronostico">Pronostico:</label>
<span id="pronostico"></span><br>
</form>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-3843174716781673922024-01-07T15:06:00.000-08:002024-01-07T15:06:44.091-08:00sistema<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Doppie Chance Scommesse Ridotto</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
}
label {
display: block;
margin-bottom: 5px;
}
button {
margin-top: 10px;
padding: 5px 10px;
font-size: 16px;
cursor: pointer;
}
</style>
</head>
<body>
<h1>Doppie Chance Scommesse Ridotto</h1>
<form id="scommesseForm">
<!-- Partita 1 -->
<label for="partita1">Partita 1:</label>
<input type="text" id="partita1" placeholder="Nome partita" required>
<label for="quota1">Quota 1:</label>
<input type="number" id="quota1" step="0.01" placeholder="Quota 1" required>
<label for="quotaX">Quota X:</label>
<input type="number" id="quotaX" step="0.01" placeholder="Quota X" required>
<label for="quota2">Quota 2:</label>
<input type="number" id="quota2" step="0.01" placeholder="Quota 2" required>
<!-- Partita 2 -->
<label for="partita2">Partita 2:</label>
<input type="text" id="partita2" placeholder="Nome partita" required>
<label for="quota21">Quota 1:</label>
<input type="number" id="quota21" step="0.01" placeholder="Quota 1" required>
<label for="quota2X">Quota X:</label>
<input type="number" id="quota2X" step="0.01" placeholder="Quota X" required>
<label for="quota22">Quota 2:</label>
<input type="number" id="quota22" step="0.01" placeholder="Quota 2" required>
<!-- Partita 3 -->
<label for="partita3">Partita 3:</label>
<input type="text" id="partita3" placeholder="Nome partita" required>
<label for="quota31">Quota 1:</label>
<input type="number" id="quota31" step="0.01" placeholder="Quota 1" required>
<label for="quota3X">Quota X:</label>
<input type="number" id="quota3X" step="0.01" placeholder="Quota X" required>
<label for="quota32">Quota 2:</label>
<input type="number" id="quota32" step="0.01" placeholder="Quota 2" required>
<button type="button" onclick="calcolaScommesse()">Calcola</button>
</form>
<script>
function calcolaScommesse() {
var risultato = "";
risultato += valutaQuota(1);
risultato += valutaQuota(2);
risultato += valutaQuota(3);
alert("Scommesse consigliate: " + risultato.trim());
}
function valutaQuota(partita) {
var quota1 = parseFloat(document.getElementById('quota' + partita).value);
var quotaX = parseFloat(document.getElementById('quota' + partita + 'X').value);
var quota2 = parseFloat(document.getElementById('quota' + partita + '2').value);
var risultato = "";
if (quota1 >= 1.85 && quota1 <= 2.3) {
risultato += "1X ";
}
if (quotaX >= 2.7 && quotaX <= 3.25) {
risultato += "X2 ";
}
return risultato;
}
</script>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-56334935424624973302023-12-25T13:10:00.000-08:002023-12-25T13:25:41.418-08:00estrazione 20 num
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sorteggio Numeri</title>
<style>
#output {
margin-top: 10px;
}
.pallina {
display: inline-block;
width: 30px;
height: 30px;
border-radius: 50%;
text-align: center;
line-height: 30px;
margin-right: 5px;
}
.estratto {
background-color: blue;
color: white;
}
.pronostico {
background-color: red;
color: white;
}
</style>
</head>
<body>
<label for="pronostico">Inserisci i numeri da pronosticare (da 1 a 10, separati da virgola):</label>
<input type="text" id="pronostico" placeholder="Esempio: 3, 7, 9">
<button onclick="iniziaEstrazione()">Estrazione</button>
<button onclick="resettaEstrazione()">Reset</button>
<div id="output"></div>
<script>
function generaNumeroCasuale(min, max, numeriEstratti) {
let numero;
do {
numero = Math.floor(Math.random() * (max - min + 1)) + min;
} while (numeriEstratti.includes(numero));
numeriEstratti.push(numero);
return numero;
}
function estraiNumero(numeriEstratti) {
const numeroEstratto = generaNumeroCasuale(1, 90, numeriEstratti);
const pallina = document.createElement('div');
pallina.classList.add('pallina', 'estratto');
pallina.innerText = numeroEstratto;
document.getElementById('output').appendChild(pallina);
const pronostico = document.getElementById('pronostico').value;
const numeriPronosticati = pronostico.split(',').map(num => parseInt(num.trim()));
if (numeriPronosticati.includes(numeroEstratto)) {
pallina.classList.add('pronostico');
}
}
function iniziaEstrazione() {
document.getElementById('output').innerHTML = '';
const numeriEstratti = [];
for (let i = 0; i < 20; i++) {
setTimeout(() => estraiNumero(numeriEstratti), i * 1000);
}
}
function resettaEstrazione() {
document.getElementById('output').innerHTML = '';
document.getElementById('pronostico').value = '';
}
</script>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-20936390753457110452023-08-29T06:53:00.003-07:002023-08-29T06:53:50.692-07:00probabolla<!DOCTYPE html>
<html>
<head>
<title>Calcolatore Probabilità di Vincita</title>
</head>
<body>
<h2>Calcolatore Probabilità di Vincita</h2>
<form>
<label for="numPartite">Numero di Partite:</label>
<input type="number" id="numPartite" min="1" value="1"><br><br>
<div id="quoteInputs">
<!-- Qui verranno aggiunti gli input delle quote dinamicamente -->
</div>
<br/>
<input type="button" value="Calcola" onclick="calcolaProbabilitaVincita()">
<input type="button" value="Reset" onclick="resetCalcolatore()">
</form>
<br>
<div id="risultato"></div>
<div id="suggerimentoBudget"></div>
<script>
function aggiungiQuoteInputs(numPartite) {
// ... (la tua funzione esistente per aggiungere gli input delle quote)
}
function calcolaProbabilitaVincita() {
// ... (la tua funzione esistente per calcolare la probabilità di vincita)
var suggerimentoBudgetElement = document.getElementById("suggerimentoBudget");
var percentualeBudgetDaGiocare;
if (probabilitaVincita < 0.5) {
percentualeBudgetDaGiocare = 0.03; // 3%
} else {
percentualeBudgetDaGiocare = 0.05; // 5%
}
var budgetDaGiocare = (percentualeBudgetDaGiocare * 100).toFixed(2);
suggerimentoBudgetElement.innerHTML = "Suggerimento: Gioca il " + budgetDaGiocare + "% del budget.";
}
function resetCalcolatore() {
// ... (la tua funzione esistente per il reset del calcolatore)
}
document.getElementById("numPartite").addEventListener("input", function() {
var numPartite = parseInt(this.value);
aggiungiQuoteInputs(numPartite);
});
</script>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-67209887802465171192023-08-11T15:44:00.006-07:002023-08-11T16:15:09.457-07:00probabilità bolla
<!DOCTYPE html>
<html>
<head>
<title>Calcolatore Probabilità di Vincita</title>
</head>
<body>
<h2>Calcolatore Probabilità di Vincita</h2>
<form>
<label for="numPartite">Numero di Partite:</label>
<input type="number" id="numPartite" min="1" value="1"><br><br>
<div id="quoteInputs">
<!-- Qui verranno aggiunti gli input delle quote dinamicamente -->
</div>
<br/>
<input type="button" value="Calcola" onclick="calcolaProbabilitaVincita()">
<input type="button" value="Reset" onclick="resetCalcolatore()">
</form>
<br>
<div id="risultato"></div>
<script>
function aggiungiQuoteInputs(numPartite) {
var quoteInputsContainer = document.getElementById("quoteInputs");
quoteInputsContainer.innerHTML = ""; // Pulisce eventuali input precedenti
for (var i = 0; i < numPartite; i++) {
var label = document.createElement("label");
label.textContent = "Quota Partita " + (i + 1) + ": ";
var input = document.createElement("input");
input.type = "number";
input.className = "quotaInput";
input.min = "1";
input.value = "1";
quoteInputsContainer.appendChild(label);
quoteInputsContainer.appendChild(input);
quoteInputsContainer.appendChild(document.createElement("br"));
}
}
function calcolaProbabilitaVincita() {
var numPartite = parseInt(document.getElementById("numPartite").value);
var quotaInputs = document.getElementsByClassName("quotaInput");
var probabilitaTotali = 0;
for (var i = 0; i < numPartite; i++) {
var quota = parseFloat(quotaInputs[i].value);
probabilitaTotali += 1 / quota;
}
var probabilitaMedia = probabilitaTotali / numPartite;
var probabilitaVincita = Math.pow(probabilitaMedia, numPartite);
var valoreFinale = (probabilitaVincita * 100).toFixed(2);
var risultatoElement = document.getElementById("risultato");
risultatoElement.innerHTML = "La probabilità di vincere è: " + valoreFinale + "%";
if (valoreFinale > 70) {
risultatoElement.style.color = "green";
} else if (valoreFinale > 50) {
risultatoElement.style.color = "blue";
} else if (valoreFinale > 35) {
risultatoElement.style.color = "orange";
} else {
risultatoElement.style.color = "red";
}
}
function resetCalcolatore() {
document.getElementById("risultato").innerHTML = "";
document.getElementById("risultato").style.color = "black";
document.getElementById("numPartite").value = "1";
aggiungiQuoteInputs(1);
}
document.getElementById("numPartite").addEventListener("input", function() {
var numPartite = parseInt(this.value);
aggiungiQuoteInputs(numPartite);
});
</script>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-44300836799600095062023-08-11T01:47:00.024-07:002023-08-11T06:05:52.206-07:00bozza picchetto ht<!DOCTYPE html>
<html>
<head>
<title>Calcolatore Picchetto Tecnico</title>
<style>
.green {
color: green;
}
.blue {
color: blue;
}
.red {
color: red;
}
.bold {
font-weight: bold;
}
</style>
</head>
<body>
<br/>
<p><span class="bold">Vuoi calcolare il picchetto tecnico?</span></p>
<button type="button" onclick="showCalculator()">Si</button>
<button type="button" onclick="hideCalculator()">No</button>
<br/>
<form id="calculator" style="display:none;">
<label for="timeSelection">Seleziona FT o HT:</label>
<select id="timeSelection">
<option value="ft">FT</option>
<option value="ht">HT</option>
</select><br><br>
<label for="ngc">Numero di partite vinte in casa dalla squadra di casa:</label>
<input id="ngc" required type="number"><br><br>
<label for="pareggic">Pareggi della squadra di casa in casa:</label>
<input id="pareggic" required type="number"><br><br>
<label for="pgcs">Partite perse in casa dalla squadra di casa:</label>
<input id="pgcs" required type="number"><br><br>
<label for="pvf">Numero di partite vinte fuori casa dalla squadra ospite:</label>
<input id="pvf" required type="number"><br><br>
<label for="pareggif">Pareggi della squadra ospite in trasferta:</label>
<input id="pareggif" required type="number"><br><br>
<label for="pgf">Partite perse fuori casa dalla squadra ospite:</label>
<input id="pgf" required type="number"><br><br>
<button type="button" onclick="calculate()">Calcola Picchetti</button>
<button type="button" onclick="resetForm()">Cancella</button>
</form>
<div id="results" style="display:none">
<br/>
<h2>Risultati:</h2>
<p>Picchetto Segno 1: <span id="picchetto1" class="bold"></span></p>
<p>Picchetto Segno X: <span id="picchettoX" class="bold"></span></p>
<p>Picchetto Segno 2: <span id="picchetto2" class="bold"></span></p>
</div>
<script>
function showCalculator() {
document.getElementById("calculator").style.display = "block";
document.getElementById("results").style.display = "none";
}
function hideCalculator() {
document.getElementById("calculator").style.display = "none";
document.getElementById("results").style.display = "none";
}
function calculate() {
var selectedTime = document.getElementById("timeSelection").value;
var ngc = parseFloat(document.getElementById("ngc").value);
var pareggic = parseFloat(document.getElementById("pareggic").value);
var pgcs = parseFloat(document.getElementById("pgcs").value);
var pvf = parseFloat(document.getElementById("pvf").value);
var pareggif = parseFloat(document.getElementById("pareggif").value);
var pgf = parseFloat(document.getElementById("pgf").value);
var z1 = ngc + pgf;
var z2 = pareggic + pareggif;
var z3 = pvf + pgcs;
var zt = z1 + z2 + z3;
var picchetto1 = (z1 / zt) * 100;
var picchettoX = (z2 / zt) * 100;
var picchetto2 = (z3 / zt) * 100;
document.getElementById("picchetto1").textContent = picchetto1.toFixed(2) + '%';
document.getElementById("picchettoX").textContent = picchettoX.toFixed(2) + '%';
document.getElementById("picchetto2").textContent = picchetto2.toFixed(2) + '%';
document.getElementById("picchetto1").classList.remove("green", "blue", "red");
document.getElementById("picchettoX").classList.remove("green", "blue", "red");
document.getElementById("picchetto2").classList.remove("green", "blue", "red");
if (picchetto1 > 42) {
document.getElementById("picchetto1").classList.add("green");
} else if (picchetto1 > 34) {
document.getElementById("picchetto1").classList.add("blue");
} else {
document.getElementById("picchetto1").classList.add("red");
}
if (picchettoX > 42) {
document.getElementById("picchettoX").classList.add("green");
} else if (picchettoX > 34) {
document.getElementById("picchettoX").classList.add("blue");
} else {
document.getElementById("picchettoX").classList.add("red");
}
if (picchetto2 > 42) {
document.getElementById("picchetto2").classList.add("green");
} else if (picchetto2 > 34) {
document.getElementById("picchetto2").classList.add("blue");
} else {
document.getElementById("picchetto2").classList.add("red");
}
document.getElementById("results").style.display = "block";
updateLabels(selectedTime);
}
function resetForm() {
document.getElementById("calculator").reset();
document.getElementById("results").style.display = "none";
hideCalculator();
}
function updateLabels(selectedTime) {
var labels = document.querySelectorAll("[id$='-label']");
labels.forEach(function(label) {
label.textContent = selectedTime.toUpperCase();
});
}
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Menù a Tendina con Popup</title>
<script>
function openPopup(link) {
window.open(link, '_blank', 'width=1200,height=800');
}
</script>
</head>
<body>
<h2>Seleziona un'opzione per aprire un popup:</h2>
<select id="popupMenu" onchange="openPopup(this.value)">
<option value="" selected>Seleziona un'opzione</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=argentina1">Argentina 1</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=austria1">Austria 1</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=austria2">Austria 2</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=belgium">Belgio 1</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=brazil">Brasile 1</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=switzerland">Svizzera 1</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=germany">Germania 1</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=germany2">Germania 2</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=denmark">Danimarca 1</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=england">Inghilterra 1</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=england2">Inghilterra 2</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=england3">Inghilterra 3</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=spain">Spagna 1</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=spain2">Spagna 2</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=finland">Finlandia 1</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=finland2">Finlandia 2</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=france">Francia 1</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=france2">Francia 2</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=greece">Grecia 1</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=netherlands">Olanda 1</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=netherlands2">Olanda 2</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=italy">Italia 1</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=italy2">Italia 2</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=italy3">Italia 3</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=italy4">Italia 4</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=italy5">Italia 5</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=norway">Norvegia 1</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=norway2">Norvegia 2</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=portugal">Portogallo 1</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=scotland">Scozia 1</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=sweden">Svezia 1</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=turkey">Turchia 1</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=ukraine">Ukraina 1</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=poland">Polonia 1</option>
<option value="https://www.soccerstats.com/homeaway.asp?league=iceland">Islanda 1</option>
<option value="https://www.soccerstats.com/">Altri campionati</option>
<!-- Aggiungi altre opzioni qui -->
</select>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-24074627968310026382023-07-13T01:40:00.001-07:002023-07-13T01:40:09.452-07:00Calcola le probabilità di chiudere una bolletta<!DOCTYPE html>
<html>
<head>
<title>Calcolatore Probabilità di Vincita</title>
</head>
<body>
<h2>Calcolatore Probabilità di Vincita</h2>
<form>
<label for="numPartite">Numero di Partite:</label>
<input type="number" id="numPartite" min="1" value="1"><br><br>
<label for="probabilitaMedia">Probabilità Media (%):</label>
<input type="number" id="probabilitaMedia" min="0" max="100" step="0.01" value="50"><br><br>
<input type="button" value="Calcola" onclick="calcolaProbabilitaVincita()">
</form>
<br>
<div id="risultato"></div>
<script>
function calcolaProbabilitaVincita() {
var numPartite = document.getElementById("numPartite").value;
var probabilitaMedia = document.getElementById("probabilitaMedia").value / 100;
var probabilitaVincita = Math.pow(probabilitaMedia, numPartite);
document.getElementById("risultato").innerHTML = "La probabilità di vincere è: " + (probabilitaVincita * 100).toFixed(2) + "%";
}
</script>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-19861449515157319322023-07-10T05:56:00.006-07:002023-07-10T05:58:30.976-07:00PICCO GG/NG<!DOCTYPE html>
<html>
<head>
<title>Calcolatore GG / NG</title>
<style>
.positive {
color: green;
font-weight: bold;
}
.negative {
color: red;
font-weight: bold;
}
</style>
</head>
<body>
<h1><i>Calcolatore Picchetto GG / NG by Robj</i></h1>
<br/>
<br/>
<form id="calculator-form">
<label for="match">Partita:</label>
<input type="text" id="match" required><br><br>
<label for="under-odds">Quota NG:</label>
<input type="number" id="under-odds" step="0.01" required><br><br>
<label for="over-odds">Quota GG:</label>
<input type="number" id="over-odds" step="0.01" required><br><br>
<h2>Squadra di Casa</h2>
<label for="home-matches">Numero di partite disputate in casa:</label>
<input type="number" id="home-matches" required><br><br>
<label for="home-under">NG totalizzati in casa dalla squadra di casa:</label>
<input type="number" id="home-under" required><br><br>
<label for="home-over">GG totalizzati in casa dalla squadra di casa:</label>
<input type="number" id="home-over" required><br><br>
<h2>Squadra Ospite</h2>
<label for="away-matches">Numero di partite disputate fuori casa:</label>
<input type="number" id="away-matches" required><br><br>
<label for="away-under">NG totalizzati dalla squadra ospite fuori casa:</label>
<input type="number" id="away-under" required><br><br>
<label for="away-over">GG totalizzati dalla squadra ospite fuori casa:</label>
<input type="number" id="away-over" required><br><br>
<button type="button" onclick="calculate()">Calcola</button>
<button type="button" onclick="resetForm()">Cancella</button>
</form>
<br/>
<h2>Risultati:</h2>
<p>% NG: <span id="percentage-under"></span></p>
<p>% GG: <span id="percentage-over"></span></p>
<p>Aggio: <span id="aggio"></span></p>
<p>Quota reale NG: <span id="real-under"></span></p>
<p>Quota reale GG: <span id="real-over"></span></p>
<p>Differenza quota NG: <span id="diff-under"></span></p>
<p>Differenza quota GG: <span id="diff-over"></span></p>
<script>
function calculate() {
var u1 = parseFloat(document.getElementById('under-odds').value);
var o1 = parseFloat(document.getElementById('over-odds').value);
var p1 = parseInt(document.getElementById('home-matches').value);
var uc = parseInt(document.getElementById('home-under').value);
var oc = parseInt(document.getElementById('home-over').value);
var p2 = parseInt(document.getElementById('away-matches').value);
var uo = parseInt(document.getElementById('away-under').value);
var oo = parseInt(document.getElementById('away-over').value);
var percentageUnder = ((uc + uo) / (p1 + p2)) * 100;
var percentageOver = 100 - percentageUnder;
var aggio = ((100 / u1) + (100 / o1)) - 100;
var qru = (100 - aggio) / percentageUnder;
var qro = (100 - aggio) / percentageOver;
var diffUnder = (u1 / qru) * 100 - 100;
var diffOver = (o1 / qro) * 100 - 100;
document.getElementById('percentage-under').textContent = percentageUnder.toFixed(2) + '%';
document.getElementById('percentage-over').textContent = percentageOver.toFixed(2) + '%';
document.getElementById('aggio').textContent = aggio.toFixed(2) + '%';
document.getElementById('real-under').textContent = qru.toFixed(2);
document.getElementById('real-over').textContent = qro.toFixed(2);
document.getElementById('diff-under').textContent = diffUnder.toFixed(2) + '%';
if (diffUnder > 0) {
document.getElementById('diff-under').classList.add('positive');
} else if (diffUnder < 0) {
document.getElementById('diff-under').classList.add('negative');
}
document.getElementById('diff-over').textContent = diffOver.toFixed(2) + '%';
if (diffOver > 0) {
document.getElementById('diff-over').classList.add('positive');
} else if (diffOver < 0) {
document.getElementById('diff-over').classList.add('negative');
}
}
function resetForm() {
document.getElementById('calculator-form').reset();
document.getElementById('percentage-under').textContent = '';
document.getElementById('percentage-over').textContent = '';
document.getElementById('aggio').textContent = '';
document.getElementById('real-under').textContent = '';
document.getElementById('real-over').textContent = '';
document.getElementById('diff-under').textContent = '';
document.getElementById('diff-over').textContent = '';
document.getElementById('diff-under').classList.remove('positive', 'negative');
document.getElementById('diff-over').classList.remove('positive', 'negative');
}
</script>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-71686988963705741932023-07-10T02:06:00.047-07:002023-07-10T14:21:00.726-07:002 picco over/under<!DOCTYPE html>
<html>
<head>
<title>Calcolatore Over 2,5 / Under 2,5</title>
<style>
.positive {
color: green;
font-weight: bold;
}
.negative {
color: red;
font-weight: bold;
}
</style>
</head>
<body>
<h1><i>Calcolatore Picchetto Over 2,5 / Under 2,5 by Robj</i></h1>
<br/>
<br/>
<form id="calculator-form">
<label for="match">Partita:</label>
<input type="text" id="match" required><br><br>
<label for="under-odds">Quota Under 2,5:</label>
<input type="number" id="under-odds" step="0.01" required><br><br>
<label for="over-odds">Quota Over 2,5:</label>
<input type="number" id="over-odds" step="0.01" required><br><br>
<h2>Squadra di Casa</h2>
<label for="home-matches">Numero di partite disputate in casa dalla squadra di casa:</label>
<input type="number" id="home-matches" required><br><br>
<label for="home-under">Under 2,5 totalizzati in casa dalla squadra di casa:</label>
<input type="number" id="home-under" required><br><br>
<label for="home-over">Over 2,5 totalizzati in casa dalla squadra di casa:</label>
<input type="number" id="home-over" required><br><br>
<h2>Squadra Ospite</h2>
<label for="away-matches">Numero di partite disputate fuori casa dalla squadra ospite:</label>
<input type="number" id="away-matches" required><br><br>
<label for="away-under">Under 2,5 totalizzati fuori casa dalla squadra ospite:</label>
<input type="number" id="away-under" required><br><br>
<label for="away-over">Over 2,5 totalizzati fuori casa dalla squadra ospite:</label>
<input type="number" id="away-over" required><br><br>
<button type="button" onclick="calculate()">Calcola</button>
<button type="button" onclick="resetForm()">Cancella</button>
</form>
<br/>
<h2>Risultati:</h2>
<p>% Under 2,5: <span id="percentage-under"></span></p>
<p>% Over 2,5: <span id="percentage-over"></span></p>
<p>Aggio: <span id="aggio"></span></p>
<p>Quota reale Under 2,5: <span id="real-under"></span></p>
<p>Quota reale Over 2,5: <span id="real-over"></span></p>
<p>Differenza quota Under 2,5: <span id="diff-under"></span></p>
<p>Differenza quota Over 2,5: <span id="diff-over"></span></p>
<script>
function calculate() {
var u1 = parseFloat(document.getElementById('under-odds').value);
var o1 = parseFloat(document.getElementById('over-odds').value);
var p1 = parseInt(document.getElementById('home-matches').value);
var uc = parseInt(document.getElementById('home-under').value);
var oc = parseInt(document.getElementById('home-over').value);
var p2 = parseInt(document.getElementById('away-matches').value);
var uo = parseInt(document.getElementById('away-under').value);
var oo = parseInt(document.getElementById('away-over').value);
var percentageUnder = ((uc + uo) / (p1 + p2)) * 100;
var percentageOver = 100 - percentageUnder;
var aggio = ((100 / u1) + (100 / o1)) - 100;
var qru = (100 - aggio) / percentageUnder;
var qro = (100 - aggio) / percentageOver;
var diffUnder = (u1 / qru) * 100 - 100;
var diffOver = (o1 / qro) * 100 - 100;
document.getElementById('percentage-under').textContent = percentageUnder.toFixed(2) + '%';
document.getElementById('percentage-over').textContent = percentageOver.toFixed(2) + '%';
document.getElementById('aggio').textContent = aggio.toFixed(2) + '%';
document.getElementById('real-under').textContent = qru.toFixed(2);
document.getElementById('real-over').textContent = qro.toFixed(2);
var diffUnderElement = document.getElementById('diff-under');
diffUnderElement.textContent = diffUnder.toFixed(2) + '%';
diffUnderElement.classList.remove('positive', 'negative');
if (diffUnder > 0) {
diffUnderElement.classList.add('positive');
diffUnderElement.innerHTML += '<i style="color: blue;"> <br/>Questa quota è pagata bene in rapporto alla probabilità che si verifichi l\'evento.</i>';
} else if (diffUnder < 0) {
diffUnderElement.classList.add('negative');
}
var diffOverElement = document.getElementById('diff-over');
diffOverElement.textContent = diffOver.toFixed(2) + '%';
diffOverElement.classList.remove('positive', 'negative');
if (diffOver > 0) {
diffOverElement.classList.add('positive');
diffOverElement.innerHTML += '<i style="color: blue;"> <br/>Questa quota è pagata bene in rapporto alla probabilità che si verifichi l\'evento.</i>';
} else if (diffOver < 0) {
diffOverElement.classList.add('negative');
}
}
function resetForm() {
document.getElementById('calculator-form').reset();
document.getElementById('percentage-under').textContent = '';
document.getElementById('percentage-over').textContent = '';
document.getElementById('aggio').textContent = '';
document.getElementById('real-under').textContent = '';
document.getElementById('real-over').textContent = '';
document.getElementById('diff-under').textContent = '';
document.getElementById('diff-over').textContent = '';
document.getElementById('diff-under').classList.remove('positive', 'negative');
document.getElementById('diff-over').classList.remove('positive', 'negative');
}
</script>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-7745153237545308512023-07-10T00:41:00.015-07:002023-07-10T02:05:42.832-07:00picco over<!DOCTYPE html>
<html>
<head>
<title>Calcolatore Over 2,5 e Under 2,5</title>
<script>
function calculatePercentage() {
var p1 = parseInt(document.getElementById("partiteCasa").value);
var p2 = parseInt(document.getElementById("partiteOspite").value);
var k1 = parseInt(document.getElementById("underCasa").value);
var k2 = parseInt(document.getElementById("overCasa").value);
var k3 = parseInt(document.getElementById("underOspite").value);
var k4 = parseInt(document.getElementById("overOspite").value);
var overPercentage = ((k2 + k4) / (p1 + p2)) * 100;
var underPercentage = 100 - overPercentage;
document.getElementById("overPercentage").innerHTML = overPercentage.toFixed(2);
document.getElementById("underPercentage").innerHTML = underPercentage.toFixed(2);
}
function addGame() {
var gamesContainer = document.getElementById("gamesContainer");
var gameDiv = document.createElement("div");
gameDiv.className = "game";
var gameNumber = gamesContainer.getElementsByClassName("game").length + 1;
var squadreLabel = document.createElement("label");
squadreLabel.textContent = "Squadre " + gameNumber + ":";
var squadreInput = document.createElement("input");
squadreInput.type = "text";
squadreInput.name = "squadre[]";
var underLabel = document.createElement("label");
underLabel.textContent = "Quota Under 2,5: ";
var underInput = document.createElement("input");
underInput.type = "number";
underInput.name = "underQuota[]";
var overLabel = document.createElement("label");
overLabel.textContent = "Quota Over 2,5: ";
var overInput = document.createElement("input");
overInput.type = "number";
overInput.name = "overQuota[]";
gameDiv.appendChild(squadreLabel);
gameDiv.appendChild(squadreInput);
gameDiv.appendChild(document.createElement("br"));
gameDiv.appendChild(underLabel);
gameDiv.appendChild(underInput);
gameDiv.appendChild(document.createElement("br"));
gameDiv.appendChild(overLabel);
gameDiv.appendChild(overInput);
gamesContainer.appendChild(gameDiv);
}
</script>
</head>
<body>
<h1>Calcolatore Over 2,5 e Under 2,5</h1>
<form>
<div id="gamesContainer">
<div class="game">
<label for="squadre1">Squadre 1:</label>
<input type="text" name="squadre[]">
<br>
<label for="underQuota1">Quota Under 2,5: </label>
<input type="number" name="underQuota[]">
<br>
<label for="overQuota1">Quota Over 2,5: </label>
<input type="number" name="overQuota[]">
</div>
</div>
<button type="button" onclick="addGame()">Aggiungi Partita</button>
<br><br>
<label for="partiteCasa">Numero di partite disputate in casa dalla squadra di casa:</label>
<input type="number" id="partiteCasa" name="partiteCasa">
<br>
<label for="underCasa">Under 2,5 totalizzati in casa dalla squadra di casa:</label>
<input type="number" id="underCasa" name="underCasa">
<br>
<label for="overCasa">Over 2,5 totalizzati in casa dalla squadra di casa:</label>
<input type="number" id="overCasa" name="overCasa">
<br>
<label for="partiteOspite">Numero di partite disputate fuori casa dalla squadra ospite:</label>
<input type="number" id="partiteOspite" name="partiteOspite">
<br>
<label for="underOspite">Under 2,5 totalizzati dalla squadra ospite:</label>
<input type="number" id="underOspite" name="underOspite">
<br>
<label for="overOspite">Over 2,5 totalizzati dalla squadra ospite:</label>
<input type="number" id="overOspite" name="overOspite">
<br><br>
<button type="button" onclick="calculatePercentage()">Calcola</button>
<h2>Risultati:</h2>
<p>% Over 2,5: <span id="overPercentage"></span></p>
<p>% Under 2,5: <span id="underPercentage"></span></p>
</form>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-58726433836458974422023-07-06T04:45:00.027-07:002023-07-07T01:53:10.268-07:00iframe<!DOCTYPE html>
<html>
<head>
<style>
.container {
display: flex;
}
.formazione {
flex: 1;
margin-right: 20px;
}
h2 {
margin-top: 0;
}
</style>
<script>
function sorteggiaTitolari(giocatori) {
var titolari = [];
// Sorteggio del primo giocatore con probabilità del 90%
var primoGiocatore = Math.random() < 0.9 ? giocatori[0] : giocatori[1];
titolari.push(primoGiocatore);
// Sorteggio dei giocatori successivi
var range1 = giocatori.slice(2, 7);
var range2 = giocatori.slice(7, 15);
var range3 = giocatori.slice(15, 20);
for (var i = 0; i < 4; i++) {
var giocatore = range1[Math.floor(Math.random() * range1.length)];
titolari.push(giocatore);
range1 = range1.filter(function(g) { return g !== giocatore; });
}
for (var i = 0; i < 4; i++) {
var giocatore = range2[Math.floor(Math.random() * range2.length)];
titolari.push(giocatore);
range2 = range2.filter(function(g) { return g !== giocatore; });
}
for (var i = 0; i < 2; i++) {
var giocatore = range3[Math.floor(Math.random() * range3.length)];
titolari.push(giocatore);
range3 = range3.filter(function(g) { return g !== giocatore; });
}
return titolari;
}
function mostraFormazioni() {
var squadraCasa = document.getElementById("squadra-casa").value;
var squadraOspite = document.getElementById("squadra-ospite").value;
var formazioneCasa = "";
var formazioneOspite = "";
switch (squadraCasa) {
case "atalanta":
var giocatoriAtalanta = ["MUSSO", "SPORTIELLO", "TOLOI", "PALOMINO", "DJIMSITI", "DEMIRAL", "OKOLI", "KOOPMEINERS", "MAEHLE", "HATEBOER", "EDERSON", "DE ROON", "ZAPPACOSTA", "SOPPY", "PASALIC", "BOGA", "LOOKMAN", "HOJLUND", "ZAPATA", "MURIEL"];
var titolariCasa = sorteggiaTitolari(giocatoriAtalanta);
var riserveCasa = giocatoriAtalanta.filter(function(giocatore) {
return !titolariCasa.includes(giocatore);
}).slice(0, 10);
formazioneCasa = "<strong>Formazione Atalanta:</strong><br>" + titolariCasa.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveCasa.join("<br>");
break;
case "bologna":
var giocatoriBologna = ["SKORUPSKI", "BARDI", "KYRIAKOPOULOS", "LYKOGIANNIS", "SOUMAORO", "POSCH", "BONIFAZI", "CAMBIASO", "MEDEL", "DOMINGUEZ", "SORIANO", "AEBISCHER", "SCHOUTEN", "DE SILVESTRI", "ORSOLINI", "BARROW", "SANSONE", "ZIRKZEE", "ARNAUTOVIC", "RAIMONDO"];
var titolariCasa = sorteggiaTitolari(giocatoriBologna);
var riserveCasa = giocatoriBologna.filter(function(giocatore) {
return !titolariCasa.includes(giocatore);
}).slice(0, 10);
formazioneCasa = "<strong>Formazione Bologna:</strong><br>" + titolariCasa.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveCasa.join("<br>");
break;
case "cremonese":
var giocatoriCremonese = ["CARNESECCHI", "SARO", "LOCHOSHVILI", "CHIRICHES", "AIWU", "VASQUEZ", "VALERI", "SERNICOLA", "PICKEL", "MEITE", "BENASSI", "GHIGLIONE", "MILANESE", "AFENA GYAN", "CIOFANI", "BUONAIUTO", "OKEREKE", "DESSERS", "TSADJOUT", "ROCKI"];
var titolariCasa = sorteggiaTitolari(giocatoriCremonese);
var riserveCasa = giocatoriCremonese.filter(function(giocatore) {
return !titolariCasa.includes(giocatore);
}).slice(0, 10);
formazioneCasa = "<strong>Formazione Cremonese:</strong><br>" + titolariCasa.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveCasa.join("<br>");
break;
case "milan":
var giocatoriMilan = ["MAIGNAN", "TATARUSANU", "CALABRIA", "TOMORI", "DEST", "KALULU", "KJAER", "HERNANDEZ", "BENNACER", "KRUNIC", "DIAZ", "TONALI", "DE KETELAERE", "SAELEMAEKERS", "MESSIAS", "REBIC", "ORIGI", "RAFAEL LEAO", "GIRAUD", "IBRAHIMOVIC"];
var titolariCasa = sorteggiaTitolari(giocatoriMilan);
var riserveCasa = giocatoriMilan.filter(function(giocatore) {
return !titolariCasa.includes(giocatore);
}).slice(0, 10);
formazioneCasa = "<strong>Formazione Milan:</strong><br>" + titolariCasa.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveCasa.join("<br>");
break;
case "napoli":
var giocatoriNapoli = ["MERET", "GOLLINI", "MARIO RUI", "OLIVERA", "RRAHMANI", "OSTIGARD", "MIN JAE KIM", "DI LORENZO", "DEMME", "LOBOTKA", "NDOMBELE", "ZIELINSKI", "ELMAS", "ANGUISSA", "KVARATSKHELIA", "OSIMHEN", "POLITANO", "LOZANO", "SIMEONE", "RASPADORI"];
var titolariCasa = sorteggiaTitolari(giocatoriNapoli);
var riserveCasa = giocatoriNapoli.filter(function(giocatore) {
return !titolariCasa.includes(giocatore);
}).slice(0, 10);
formazioneCasa = "<strong>Formazione Napoli:</strong><br>" + titolariCasa.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveCasa.join("<br>");
break;
case "juventus":
var giocatoriJuventus = ["SZCZESNY", "PERIN", "GATTI", "BONUCCI", "DE SCIGLIO", "BREMER", "DANILO", "ALEX SANDRO", "CUADRADO", "LOCATELLI", "PAREDES", "POGBA", "FAGIOLI", "MIRETTI", "KOSTIC", "CHIESA", "VLAHOVIC", "MILIK", "KEAN", "DI MARIA"];
var titolariCasa = sorteggiaTitolari(giocatoriJuventus);
var riserveCasa = giocatoriJuventus.filter(function(giocatore) {
return !titolariCasa.includes(giocatore);
}).slice(0, 10);
formazioneCasa = "<strong>Formazione Juventus:</strong><br>" + titolariCasa.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveCasa.join("<br>");
break;
case "lazio":
var giocatoriLazio = ["MAXIMIANO", "PROVEDEL", "CASALE", "ROMAGNOLI", "RADU", "HYSAJ", "PATRIC", "LAZZARI", "VECINO", "MILINKOVIC S", "LUIS ALBERTO", "FARES", "CATALDI", "MARUSIC", "BASIC", "IMMOBILE", "PEDRO", "CANCELLIERI", "ZACCAGNI", "ANDERSON"];
var titolariCasa = sorteggiaTitolari(giocatoriLazio);
var riserveCasa = giocatoriLazio.filter(function(giocatore) {
return !titolariCasa.includes(giocatore);
}).slice(0, 10);
formazioneCasa = "<strong>Formazione Lazio:</strong><br>" + titolariCasa.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveCasa.join("<br>");
break;
case "fiorentina":
var giocatoriFiorentina = ["DRAGOWSKI", "LENTI", "CATAVILLA", "MILENKOVIC", "VICARI", "CECCHERINI", "QUARTA", "BARRECA", "RIBERY", "BONAVENA", "AMRABAT", "LIROLA", "DIKS", "MONTIEL", "BROSOVIC", "CALHANOGLU", "VLAHOVIC", "KEITA", "ITALIANO", "KOUAME"];
var titolariCasa = sorteggiaTitolari(giocatoriFiorentina);
var riserveCasa = giocatoriFiorentina.filter(function(giocatore) {
return !titolariCasa.includes(giocatore);
}).slice(0, 10);
formazioneCasa = "<strong>Formazione Fiorentina:</strong><br>" + titolariCasa.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveCasa.join("<br>");
break;
case "roma":
var giocatoriRoma = ["HANDBANOVIC", "RADU", "DIMARCO", "SKRINIAR", "ACERBI", "KJAER", "DE VRIJ", "DENAYER", "KOLAROV", "GOSSENS", "COLOMBO", "MARTINEZ", "BARELLA", "FREULER", "SABITZER", "DAVID SILVA", "IMMOBILE", "AGUIRRE", "DZEKO", "CORREA"];
var titolariCasa = sorteggiaTitolari(giocatoriRoma);
var riserveCasa = giocatoriRoma.filter(function(giocatore) {
return !titolariCasa.includes(giocatore);
}).slice(0, 10);
formazioneCasa = "<strong>Formazione Roma:</strong><br>" + titolariCasa.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveCasa.join("<br>");
break;
case "inter":
var giocatoriInter = ["HANDBANOVIC", "RADU", "DIMARCO", "SKRINIAR", "ACERBI", "KJAER", "DE VRIJ", "DENAYER", "KOLAROV", "GOSSENS", "COLOMBO", "MARTINEZ", "BARELLA", "FREULER", "SABITZER", "DAVID SILVA", "IMMOBILE", "AGUIRRE", "DZEKO", "CORREA"];
var titolariCasa = sorteggiaTitolari(giocatoriInter);
var riserveCasa = giocatoriInter.filter(function(giocatore) {
return !titolariCasa.includes(giocatore);
}).slice(0, 10);
formazioneCasa = "<strong>Formazione Inter:</strong><br>" + titolariCasa.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveCasa.join("<br>");
break;
case "hellas-verona":
var giocatoriVerona = ["SILVESTRI", "BIZZARRI", "KALINIC", "MARASH KUMBULLA", "BANI", "MAGNANI", "IACOPONI", "FERRARI", "LOVATO", "FAZIO", "GABRIEL SILVA", "VIEIRA", "GOMEZ", "LASAGNA", "PERRAUD", "VLAHOVIC", "BOGDAN", "MICIN", "SALA", "LOMBARDI"];
var titolariCasa = sorteggiaTitolari(giocatoriVerona);
var riserveCasa = giocatoriVerona.filter(function(giocatore) {
return !titolariCasa.includes(giocatore);
}).slice(0, 10);
formazioneCasa = "<strong>Formazione Verona:</strong><br>" + titolariCasa.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveCasa.join("<br>");
break;
case "udinese":
var giocatoriUdinese = ["SILVESTRI", "PADELLI", "EBOSSE", "PEREZ", "BIJOL", "MASINA", "BECAO", "PAFUNDI", "ARSLAN", "UDOGIE", "EHIZIBHUE", "PEREYRA", "WALACE", "SAMARDZIC", "LOVRIC", "THAUVIN", "BETO", "SUCCESS", "NESTOROVSKI", "DEULOFEU"];
var titolariCasa = sorteggiaTitolari(giocatoriUdinese);
var riserveCasa = giocatoriUdinese.filter(function(giocatore) {
return !titolariCasa.includes(giocatore);
}).slice(0, 10);
formazioneCasa = "<strong>Formazione Udinese:</strong><br>" + titolariCasa.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveCasa.join("<br>");
break;
case "monza":
var giocatoriMonza = ["DI GREGORIO", "CRAGNO", "MARI'", "IZZO", "CALDIROLA", "BIRINDELLI", "MARLON", "COLPANI", "MARRONE", "C.AUGUSTO", "SENSI", "ROVELLA", "CIURRIA", "MOLINA", "PESSINA", "D'ALESSANDRO", "CAPRARI", "MOTA", "GYTKJAER", "PETAGNA"];
var titolariCasa = sorteggiaTitolari(giocatoriMonza);
var riserveCasa = giocatoriMonza.filter(function(giocatore) {
return !titolariCasa.includes(giocatore);
}).slice(0, 10);
formazioneCasa = "<strong>Formazione Monza:</strong><br>" + titolariCasa.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveCasa.join("<br>");
break;
case "torino":
var giocatoriTorino = ["MILINKOVIC", "BERISHA", "AINA", "SINGO", "VOJVODA", "SCHUURS", "DJIDJI", "ADOPO", "RODRIGUEZ", "MIRANCHUK", "LUKIC", "RICCI", "ILIC", "LINETTY", "RADONJIC", "SECK", "SANABRIA", "PELLEGRI", "KARAMOH", "VLASIC"];
var titolariCasa = sorteggiaTitolari(giocatoriTorino);
var riserveCasa = giocatoriTorino.filter(function(giocatore) {
return !titolariCasa.includes(giocatore);
}).slice(0, 10);
formazioneCasa = "<strong>Formazione Torino:</strong><br>" + titolariCasa.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveCasa.join("<br>");
break;
case "sassuolo":
var giocatoriSassuolo = ["CONSIGLI", "PEGOLO", "FERRARI", "ROGERIO", "ZORTEA", "MULDUR", "TOLJAN", "HARROUI", "LOPEZ", "THORSTVEDT", "FRATTESI", "OBIANG", "HENRIQUE", "BAJRAMI", "LAURIENTE'", "ALVAREZ", "PINAMONTI", "BERARDI", "D'ANDREA", "ANTISTE"];
var titolariCasa = sorteggiaTitolari(giocatoriSassuolo);
var riserveCasa = giocatoriSassuolo.filter(function(giocatore) {
return !titolariCasa.includes(giocatore);
}).slice(0, 10);
formazioneCasa = "<strong>Formazione Sassuolo:</strong><br>" + titolariCasa.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveCasa.join("<br>");
break;
case "empoli":
var giocatoriEmpoli = ["VICARIO", "PERISAN", "LUPERTO", "TONELLI", "STOJANOVIC", "PARISI", "DE WINTER", "BALDANZI", "HENDERSON", "AKPA AKPRO", "GRASSI", "BANDINELLI", "MARIN", "HAAS", "PJACA", "PICCOLI", "SATRIANO", "DESTRO", "CAMBIAGHI", "CAPUTO"];
var titolariCasa = sorteggiaTitolari(giocatoriEmpoli);
var riserveCasa = giocatoriEmpoli.filter(function(giocatore) {
return !titolariCasa.includes(giocatore);
}).slice(0, 10);
formazioneCasa = "<strong>Formazione Empoli:</strong><br>" + titolariCasa.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveCasa.join("<br>");
break;
case "salernitana":
var giocatoriSalernitana = ["SEPE", "FIORILLO", "BRONN", "BRADARIC", "FAZIO", "GYOMBER", "DANILIUC", "MAGGIORE", "CRNIGOJ", "COULIBALY", "VILHENA", "MAZZOCCHI", "KASTANOS", "BOHINEN", "CANDREVA", "BONAZZOLI", "BOTHEIM", "PIATEK", "DIA", "VALENCIA"];
var titolariCasa = sorteggiaTitolari(giocatoriSalernitana);
var riserveCasa = giocatoriSalernitana.filter(function(giocatore) {
return !titolariCasa.includes(giocatore);
return !titolariCasa.includes(giocatore);
}).slice(0, 10);
formazioneCasa = "<strong>Formazione Salernitana:</strong><br>" + titolariCasa.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveCasa.join("<br>");
break;
case "spezia":
var giocatoriSpezia = ["DRAGOWSKI", "MARCHETTI", "AMPADU", "CALDARA", "NIKOLAOU", "HOLM", "WISNIEWSKI", "BASTONI", "AMIAN", "BOURABIA", "EKDAL", "ZURKOWSKI", "GYASI", "MALDINI", "RECA", "KOVALENKO", "VERDE", "AGUDELO", "NZOLA", "SHOMURODOV"];
var titolariCasa = sorteggiaTitolari(giocatoriSpezia);
var riserveCasa = giocatoriSpezia.filter(function(giocatore) {
return !titolariCasa.includes(giocatore);
}).slice(0, 10);
formazioneCasa = "<strong>Formazione Spezia:</strong><br>" + titolariCasa.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveCasa.join("<br>");
break;
case "lecce":
var giocatoriLecce = ["FALCONE", "BLEVE", "BASCHIROTTO", "GALLO", "UMTITI", "PEZZELLA", "PONGRACIC", "HJULMAND", "MALEH", "GONZALEZ", "STREFEZZA", "DI FRANCESCO", "OUDIN", "HELGASON", "ASKILDSEN", "VOELKERLING", "CEESAY", "BANDA", "RODRIGUEZ", "COLOMBO"];
var titolariCasa = sorteggiaTitolari(giocatoriLecce);
var riserveCasa = giocatoriLecce.filter(function(giocatore) {
return !titolariCasa.includes(giocatore);
}).slice(0, 10);
formazioneCasa = "<strong>Formazione Lecce:</strong><br>" + titolariCasa.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveCasa.join("<br>");
break;
case "sampdoria":
var giocatoriSampdoria = ["AUDERO", "RAVAGLIA", "CONTI", "NUYTINCK", "FERRARI", "MURRU", "AUGELLO", "JESE", "CUISANCE", "DJURICIC", "SABIRI", "RINCON", "WINKS", "YEPES", "LERIS", "PUSSETTO", "LAMMERS", "DE LUCA", "GABBIADINI", "QUAGLIARELLA"];
var titolariCasa = sorteggiaTitolari(giocatoriSampdoria);
var riserveCasa = giocatoriSampdoria.filter(function(giocatore) {
return !titolariCasa.includes(giocatore);
}).slice(0, 10);
formazioneCasa = "<strong>Formazione Sampdoria:</strong><br>" + titolariCasa.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveCasa.join("<br>");
break;
default:
formazioneCasa = "Seleziona una squadra casa";
}
switch (squadraOspite) {
case "atalanta":
var giocatoriAtalanta = ["MUSSO", "SPORTIELLO", "TOLOI", "PALOMINO", "DJIMSITI", "DEMIRAL", "OKOLI", "KOOPMEINERS", "MAEHLE", "HATEBOER", "EDERSON", "DE ROON", "ZAPPACOSTA", "SOPPY", "PASALIC", "BOGA", "LOOKMAN", "HOJLUND", "ZAPATA", "MURIEL"];
var titolariOspite = sorteggiaTitolari(giocatoriAtalanta);
var riserveOspite = giocatoriAtalanta.filter(function(giocatore) {
return !titolariOspite.includes(giocatore);
}).slice(0, 10);
formazioneOspite = "<strong>Formazione Atalanta:</strong><br>" + titolariOspite.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveOspite.join("<br>");
break;
case "bologna":
var giocatoriBologna = ["SKORUPSKI", "BARDI", "KYRIAKOPOULOS", "LYKOGIANNIS", "SOUMAORO", "POSCH", "BONIFAZI", "CAMBIASO", "MEDEL", "DOMINGUEZ", "SORIANO", "AEBISCHER", "SCHOUTEN", "DE SILVESTRI", "ORSOLINI", "BARROW", "SANSONE", "ZIRKZEE", "ARNAUTOVIC", "RAIMONDO"];
var titolariOspite = sorteggiaTitolari(giocatoriBologna);
var riserveOspite = giocatoriBologna.filter(function(giocatore) {
return !titolariOspite.includes(giocatore);
}).slice(0, 10);
formazioneOspite = "<strong>Formazione Bologna:</strong><br>" + titolariOspite.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveOspite.join("<br>");
break;
case "milan":
var giocatoriMilan = ["MAIGNAN", "TATARUSANU", "CALABRIA", "TOMORI", "DEST", "KALULU", "KJAER", "HERNANDEZ", "BENNACER", "KRUNIC", "DIAZ", "TONALI", "DE KETELAERE", "SAELEMAEKERS", "MESSIAS", "REBIC", "ORIGI", "RAFAEL LEAO", "GIRAUD", "IBRAHIMOVIC"];
var titolariOspite = sorteggiaTitolari(giocatoriMilan);
var riserveOspite = giocatoriMilan.filter(function(giocatore) {
return !titolariOspite.includes(giocatore);
}).slice(0, 10);
formazioneOspite = "<strong>Formazione Milan:</strong><br>" + titolariOspite.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveOspite.join("<br>");
break;
case "napoli":
var giocatoriNapoli = ["MERET", "GOLLINI", "MARIO RUI", "OLIVERA", "RRAHMANI", "OSTIGARD", "MIN JAE KIM", "DI LORENZO", "DEMME", "LOBOTKA", "NDOMBELE", "ZIELINSKI", "ELMAS", "ANGUISSA", "KVARATSKHELIA", "OSIMHEN", "POLITANO", "LOZANO", "SIMEONE", "RASPADORI"];
var titolariOspite = sorteggiaTitolari(giocatoriNapoli);
var riserveOspite = giocatoriNapoli.filter(function(giocatore) {
return !titolariOspite.includes(giocatore);
}).slice(0, 10);
formazioneOspite = "<strong>Formazione Napoli:</strong><br>" + titolariOspite.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveOspite.join("<br>");
break;
case "juventus":
var giocatoriJuventus = ["SZCZESNY", "PERIN", "GATTI", "BONUCCI", "DE SCIGLIO", "BREMER", "DANILO", "ALEX SANDRO", "CUADRADO", "LOCATELLI", "PAREDES", "POGBA", "FAGIOLI", "MIRETTI", "KOSTIC", "CHIESA", "VLAHOVIC", "MILIK", "KEAN", "DI MARIA"];
var titolariOspite = sorteggiaTitolari(giocatoriJuventus);
var riserveOspite = giocatoriJuventus.filter(function(giocatore) {
return !titolariOspite.includes(giocatore);
}).slice(0, 10);
formazioneOspite = "<strong>Formazione Juventus:</strong><br>" + titolariOspite.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveOspite.join("<br>");
break;
case "lazio":
var giocatoriLazio = ["MAXIMIANO", "PROVEDEL", "CASALE", "ROMAGNOLI", "RADU", "HYSAJ", "PATRIC", "LAZZARI", "VECINO", "MILINKOVIC S", "LUIS ALBERTO", "FARES", "CATALDI", "MARUSIC", "BASIC", "IMMOBILE", "PEDRO", "CANCELLIERI", "ZACCAGNI", "ANDERSON"];
var titolariOspite = sorteggiaTitolari(giocatoriLazio);
var riserveOspite = giocatoriLazio.filter(function(giocatore) {
return !titolariOspite.includes(giocatore);
}).slice(0, 10);
formazioneOspite = "<strong>Formazione Lazio:</strong><br>" + titolariOspite.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveOspite.join("<br>");
break;
case "roma":
var giocatoriRoma = ["RUI PATRICIO", "SVILAR", "KUMBULLA", "MANCINI", "SMALLING", "IBANEZ", "KARSDORP", "SPINAZZOLA", "PELLEGRINI", "CRISTANTE", "MATIC", "WIJNALDUM", "ZALEWSKI", "CAMARA", "BOVE", "BELOTTI", "SOLBAKKEN", "DYBALA", "ABRAHAM", "EL SHAARAWY"];
var titolariOspite = sorteggiaTitolari(giocatoriRoma);
var riserveOspite = giocatoriRoma.filter(function(giocatore) {
return !titolariOspite.includes(giocatore);
}).slice(0, 10);
formazioneOspite = "<strong>Formazione Roma:</strong><br>" + titolariOspite.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveOspite.join("<br>");
break;
case "fiorentina":
var giocatoriFiorentina = ["SIRIGU", "TERRACCIANO", "MILENKOVIC", "DODO'", "QUARTA", "IGOR", "BIRAGHI", "DUNCAN", "CASTROVILLI", "AMRABAT", "MANDRAGORA", "BONAVENTURA", "SOTTIL", "SAPONARA", "BARAK", "JOVIC", "IKONE'", "KOUAME'", "GONZALEZ", "CABRAL"];
var titolariOspite = sorteggiaTitolari(giocatoriFiorentina);
var riserveOspite = giocatoriFiorentina.filter(function(giocatore) {
return !titolariOspite.includes(giocatore);
}).slice(0, 10);
formazioneOspite = "<strong>Formazione Fiorentina:</strong><br>" + titolariOspite.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveOspite.join("<br>");
break;
case "inter":
var giocatoriInter = ["ONANA", "HANDANOVIC", "DARMIAN", "BASTONI", "DE VRIJ", "ACERBI", "SKRINIAR", "DUMFRIES", "BROZOVIC", "GAGLIARDINI", "DI MARCO", "BARELLA", "GOSENS", "CALHANOGLU", "ASLLANI", "MKHITARYAN", "DZEKO", "LUKAKU", "MARTINEZ", "CORREA"];
var titolariOspite = sorteggiaTitolari(giocatoriInter);
var riserveOspite = giocatoriInter.filter(function(giocatore) {
return !titolariOspite.includes(giocatore);
}).slice(0, 10);
formazioneOspite = "<strong>Formazione Inter:</strong><br>" + titolariOspite.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveOspite.join("<br>");
break;
case "hellas-verona":
var giocatoriVerona = ["MONTIPO'", "PERILLI", "CECCHERINI", "FARAONI", "HIEN", "DE PAOLI", "DAWIDOWICZ", "ABILDGAARD", "TAMEZE", "DUDA", "VELOSO", "LAZOVIC", "KALLON", "HRUSTIC", "BRAAF", "NGONGE", "LASAGNA", "VERDI", "HENRY", "DJURIC"];
var titolariOspite = sorteggiaTitolari(giocatoriVerona);
var riserveOspite = giocatoriVerona.filter(function(giocatore) {
return !titolariOspite.includes(giocatore);
}).slice(0, 10);
formazioneOspite = "<strong>Formazione Verona:</strong><br>" + titolariOspite.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveOspite.join("<br>");
break;
case "torino":
var giocatoriTorino =["MILINKOVIC", "BERISHA", "AINA", "SINGO", "VOJVODA", "SCHUURS", "DJIDJI", "ADOPO", "RODRIGUEZ", "MIRANCHUK", "LUKIC", "RICCI", "ILIC", "LINETTY", "RADONJIC", "SECK", "SANABRIA", "PELLEGRI", "KARAMOH", "VLASIC"];
var titolariOspite = sorteggiaTitolari(giocatoriTorino);
var riserveOspite = giocatoriTorino.filter(function(giocatore) {
return !titolariOspite.includes(giocatore);
}).slice(0, 10);
formazioneOspite = "<strong>Formazione Torino:</strong><br>" + titolariOspite.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveOspite.join("<br>");
break;
case "sassuolo":
var giocatoriSassuolo =["CONSIGLI", "PEGOLO", "FERRARI", "ROGERIO", "ZORTEA", "MULDUR", "TOLJAN", "HARROUI", "LOPEZ", "THORSTVEDT", "FRATTESI", "OBIANG", "HENRIQUE", "BAJRAMI", "LAURIENTE'", "ALVAREZ", "PINAMONTI", "BERARDI", "D'ANDREA", "ANTISTE"];
var titolariOspite = sorteggiaTitolari(giocatoriSassuolo);
var riserveOspite = giocatoriSassuolo.filter(function(giocatore) {
return !titolariOspite.includes(giocatore);
}).slice(0, 10);
formazioneOspite = "<strong>Formazione Sassuolo:</strong><br>" + titolariOspite.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveOspite.join("<br>");
break;
case "udinese":
var giocatoriUdinese = ["SILVESTRI", "PADELLI", "EBOSSE", "PEREZ", "BIJOL", "MASINA", "BECAO", "PAFUNDI", "ARSLAN", "UDOGIE", "EHIZIBHUE", "PEREYRA", "WALACE", "SAMARDZIC", "LOVRIC", "THAUVIN", "BETO", "SUCCESS", "NESTOROVSKI", "DEULOFEU"];
var titolariOspite = sorteggiaTitolari(giocatoriUdinese);
var riserveOspite = giocatoriUdinese.filter(function(giocatore) {
return !titolariOspite.includes(giocatore);
}).slice(0, 10);
formazioneOspite = "<strong>Formazione Udinese:</strong><br>" + titolariOspite.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveOspite.join("<br>");
break;
case "spezia":
var giocatoriSpezia = ["DRAGOWSKI", "MARCHETTI", "AMPADU", "CALDARA", "NIKOLAOU", "HOLM", "WISNIEWSKI", "BASTONI", "AMIAN", "BOURABIA", "EKDAL", "ZURKOWSKI", "GYASI", "MALDINI", "RECA", "KOVALENKO", "VERDE", "AGUDELO", "NZOLA", "SHOMURODOV"];
var titolariOspite = sorteggiaTitolari(giocatoriSpezia);
var riserveOspite = giocatoriSpezia.filter(function(giocatore) {
return !titolariOspite.includes(giocatore);
}).slice(0, 10);
formazioneOspite = "<strong>Formazione Spezia:</strong><br>" + titolariOspite.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveOspite.join("<br>");
break;
case "lecce":
var giocatoriLecce = ["FALCONE", "BLEVE", "BASCHIROTTO", "GALLO", "UMTITI", "PEZZELLA", "PONGRACIC", "HJULMAND", "MALEH", "GONZALEZ", "STREFEZZA", "DI FRANCESCO", "OUDIN", "HELGASON", "ASKILDSEN", "VOELKERLING", "CEESAY", "BANDA", "RODRIGUEZ", "COLOMBO"];
var titolariOspite = sorteggiaTitolari(giocatoriLecce);
var riserveOspite = giocatoriLecce.filter(function(giocatore) {
return !titolariOspite.includes(giocatore);
}).slice(0, 10);
formazioneOspite = "<strong>Formazione Lecce:</strong><br>" + titolariOspite.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveOspite.join("<br>");
break;
case "cremonese":
var giocatoriCremonese = ["CARNESECCHI", "SARO", "LOCHOSHVILI", "CHIRICHES", "AIWU", "VASQUEZ", "VALERI", "SERNICOLA", "PICKEL", "MEITE'", "BENASSI", "GHIGLIONE", "MILANESE", "VASQUEZ", "AFENA GYAN", "CIOFANI", "BUONAIUTO", "OKEREKE", "DESSERS", "TSADJOUT"];
var titolariOspite = sorteggiaTitolari(giocatoriCremonese);
var riserveOspite = giocatoriCremonese.filter(function(giocatore) {
return !titolariOspite.includes(giocatore);
}).slice(0, 10);
formazioneOspite = "<strong>Formazione Cremonese:</strong><br>" + titolariOspite.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveOspite.join("<br>");
break;
case "monza":
var giocatoriMonza = ["DI GREGORIO", "CRAGNO", "MARI'", "IZZO", "CALDIROLA", "BIRINDELLI", "MARLON", "COLPANI", "MARRONE", "C.AUGUSTO", "SENSI", "ROVELLA", "CIURRIA", "MOLINA", "PESSINA", "D'ALESSANDRO", "CAPRARI", "MOTA", "GYTKJAER", "PETAGNA"];
var titolariOspite = sorteggiaTitolari(giocatoriMonza);
var riserveOspite = giocatoriMonza.filter(function(giocatore) {
return !titolariOspite.includes(giocatore);
}).slice(0, 10);
formazioneOspite = "<strong>Formazione Monza:</strong><br>" + titolariOspite.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveOspite.join("<br>");
break;
case "sampdoria":
var giocatoriSampdoria = ["AUDERO", "RAVAGLIA", "CONTI", "NUYTINCK", "FERRARI", "MURRU", "AUGELLO", "JESE", "CUISANCE", "DJURICIC", "SABIRI", "RINCON", "WINKS", "YEPES", "LERIS", "PUSSETTO", "LAMMERS", "DE LUCA", "GABBIADINI", "QUAGLIARELLA"];
var titolariOspite = sorteggiaTitolari(giocatoriSampdoria);
var riserveOspite = giocatoriSampdoria.filter(function(giocatore) {
return !titolariOspite.includes(giocatore);
}).slice(0, 10);
formazioneOspite = "<strong>Formazione Sampdoria:</strong><br>" + titolariOspite.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveOspite.join("<br>");
break;
case "empoli":
var giocatoriEmpoli = ["VICARIO", "PERISAN", "LUPERTO", "TONELLI", "STOJANOVIC", "PARISI", "DE WINTER", "BALDANZI", "HENDERSON", "AKPA AKPRO", "GRASSI", "BANDINELLI", "MARIN", "HAAS", "PJACA", "PICCOLI", "SATRIANO", "DESTRO", "CAMBIAGHI", "CAPUTO"];
var titolariOspite = sorteggiaTitolari(giocatoriEmpoli);
var riserveOspite = giocatoriEmpoli.filter(function(giocatore) {
return !titolariOspite.includes(giocatore);
}).slice(0, 10);
formazioneOspite = "<strong>Formazione Empoli:</strong><br>" + titolariOspite.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveOspite.join("<br>");
break;
case "salernitana":
var giocatoriSalernitana = ["SEPE", "FIORILLO", "BRONN", "BRADARIC", "FAZIO", "GYOMBER", "DANILIUC", "MAGGIORE", "CRNIGOJ", "COULIBALY", "VILHENA", "MAZZOCCHI", "KASTANOS", "BOHINEN", "CANDREVA", "BONAZZOLI", "BOTHEIM", "PIATEK", "DIA", "VALENCIA"];
var titolariOspite = sorteggiaTitolari(giocatoriSalernitana);
var riserveOspite = giocatoriSalernitana.filter(function(giocatore) {
return !titolariOspite.includes(giocatore);
}).slice(0, 10);
formazioneOspite = "<strong>Formazione Salernitana:</strong><br>" + titolariOspite.join("<br>") + "<br><br><strong>Riserve:</strong><br>" + riserveOspite.join("<br>");
break;
default:
formazioneOspite = "Seleziona una squadra ospite";
}
document.getElementById("formazione-casa").innerHTML = formazioneCasa;
document.getElementById("formazione-ospite").innerHTML = formazioneOspite;
}
</script>
</head>
<body>
<h1>Generatore di formazioni</h1>
<div>
<label for="squadra-casa">Squadra casa:</label>
<select id="squadra-casa">
<option value="">Seleziona</option>
<option value="atalanta">Atalanta</option>
<option value="bologna">Bologna</option>
<option value="cremonese">Cremonese</option>
<option value="milan">Milan</option>
<option value="napoli">Napoli</option>
<option value="juventus">Juventus</option>
<option value="lazio">Lazio</option>
<option value="roma">Roma</option>
<option value="fiorentina">Fiorentina</option>
<option value="inter">Inter</option>
<option value="hellas-verona">Hellas Verona</option>
<option value="torino">Torino</option>
<option value="sassuolo">Sassuolo</option>
<option value="udinese">Udinese</option>
<option value="empoli">Empoli</option>
<option value="sampdoria">Sampdoria</option>
<option value="spezia">Spezia</option>
<option value="lecce">Lecce</option>
<option value="salernitana">Salernitana</option>
<option value="monza">Monza</option>
</select>
</div>
<div>
<label for="squadra-ospite">Squadra ospite:</label>
<select id="squadra-ospite">
<option value="">Seleziona</option>
<option value="atalanta">Atalanta</option>
<option value="bologna">Bologna</option>
<option value="cremonese">Cremonese</option>
<option value="milan">Milan</option>
<option value="napoli">Napoli</option>
<option value="juventus">Juventus</option>
<option value="lazio">Lazio</option>
<option value="roma">Roma</option>
<option value="fiorentina">Fiorentina</option>
<option value="inter">Inter</option>
<option value="hellas-verona">Hellas Verona</option>
<option value="torino">Torino</option>
<option value="sassuolo">Sassuolo</option>
<option value="udinese">Udinese</option>
<option value="empoli">Empoli</option>
<option value="sampdoria">Sampdoria</option>
<option value="spezia">Spezia</option>
<option value="lecce">Lecce</option>
<option value="salernitana">Salernitana</option>
<option value="monza">Monza</option>
</select>
</div>
<button onclick="mostraFormazioni()">Mostra formazioni</button>
<div class="container">
<div class="formazione">
<h2>Squadra casa</h2>
<div id="formazione-casa"></div>
</div>
<div class="formazione">
<h2>Squadra ospite</h2>
<div id="formazione-ospite"></div>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Simulatore Partita di Calcio</title>
<style>
.actions {
margin-bottom: 10px;
}
.team-form {
display: inline-block;
vertical-align: top;
margin-right: 20px;
}
.goal-action {
color: red;
}
</style>
</head>
<body>
<h1>Simulatore Partita di Calcio</h1>
<div class="team-form">
<form id="homeTeamForm">
<h2>Squadra di Casa</h2>
<label for="homeTeamName">Nome Squadra:</label>
<input type="text" id="homeTeamName" required>
<h3>Titolari</h3>
<textarea id="homePlayers" rows="11" cols="25" placeholder="Inserisci i nomi dei calciatori, uno per riga" required></textarea>
<h3>Riserve</h3>
<textarea id="homeReserves" rows="9" cols="25" placeholder="Inserisci i nomi dei calciatori, uno per riga" required></textarea>
</form>
</div>
<div class="team-form">
<form id="awayTeamForm">
<h2>Squadra Avversaria</h2>
<label for="awayTeamName">Nome Squadra:</label>
<input type="text" id="awayTeamName" required>
<h3>Titolari</h3>
<textarea id="awayPlayers" rows="11" cols="25" placeholder="Inserisci i nomi dei calciatori, uno per riga" required></textarea>
<h3>Riserve</h3>
<textarea id="awayReserves" rows="9" cols="25" placeholder="Inserisci i nomi dei calciatori, uno per riga" required></textarea>
</form>
</div>
<div class="actions" id="actionsContainer"></div>
<h2>Risultato</h2>
<div id="result"></div>
<button onclick="simulate()">Simula</button>
<script>
var actionsContainer = document.getElementById("actionsContainer");
var resultContainer = document.getElementById("result");
function getPlayers(teamFormId) {
var players = [];
var playerInputs = document.querySelectorAll("#" + teamFormId + " textarea");
playerInputs.forEach(function (input) {
var names = input.value.split("\n");
names.forEach(function (name) {
if (name.trim() !== "") {
players.push(name.trim());
}
});
});
return players;
}
function getRandomPlayer(players, excludedPlayers) {
var availablePlayers = players.filter(function(player) {
return excludedPlayers.indexOf(player) === -1;
});
if (availablePlayers.length === 0) {
return null;
}
var randomIndex = Math.floor(Math.random() * availablePlayers.length);
return availablePlayers[randomIndex];
}
function generateRandomMinute(usedMinutes) {
var minute = Math.floor(Math.random() * 90) + 1;
if (usedMinutes.includes(minute)) {
return generateRandomMinute(usedMinutes);
}
return minute;
}
function simulate() {
actionsContainer.innerHTML = "";
resultContainer.innerHTML = "";
var homeTeamName = document.getElementById("homeTeamName").value;
var homePlayers = getPlayers("homeTeamForm");
var awayTeamName = document.getElementById("awayTeamName").value;
var awayPlayers = getPlayers("awayTeamForm");
var usedMinutes = [];
var excludedHomePlayers = [homePlayers[0], homePlayers[11]]; // Escludi il numero 1 e il 12 delle liste dei calciatori di casa
var excludedAwayPlayers = [awayPlayers[0], awayPlayers[11]]; // Escludi il numero 1 e il 12 delle liste dei calciatori avversari
var actions = [];
// Generate goals for home team
var homeGoals = Math.floor(Math.random() * 4); // Genera un numero casuale tra 0 e 3 per i goal della squadra di casa
for (var i = 0; i < homeGoals; i++) {
var player = getRandomPlayer(homePlayers, excludedHomePlayers);
if (player === null) {
break;
}
var minute = generateRandomMinute(usedMinutes);
if (minute < 55 && i >= 2) { // Assicura che i giocatori 13, 14, 15, 16, 17, 18, 19, 20 segnino solo dopo il minuto 55
minute = 55 + Math.floor(Math.random() * (90 - 55 + 1));
}
usedMinutes.push(minute);
actions.push({ team: homeTeamName, minute: minute, player: player });
excludedHomePlayers.push(player);
}
// Generate goals for away team
var awayGoals = Math.floor(Math.random() * 4); // Genera un numero casuale tra 0 e 3 per i goal della squadra avversaria
for (var i = 0; i < awayGoals; i++) {
var player = getRandomPlayer(awayPlayers, excludedAwayPlayers);
if (player === null) {
break;
}
var minute = generateRandomMinute(usedMinutes);
if (minute < 55 && i >= 2) { // Assicura che i giocatori 13, 14, 15, 16, 17, 18, 19, 20 segnino solo dopo il minuto 55
minute = 55 + Math.floor(Math.random() * (90 - 55 + 1));
}
usedMinutes.push(minute);
actions.push({ team: awayTeamName, minute: minute, player: player });
excludedAwayPlayers.push(player);
}
// Generate additional actions for both teams
var additionalActions = [
"Cross in area da parte dell'ala",
"Il fluidificante aspetta la sovrapposizione",
"Lo stopper ha perso il controllo della sfera",
"Calcio d'angolo molto pericoloso",
"Tiro in porta",
"Fallo commesso fuori area",
"L'attaccante perde la palla ingenuamente",
"Cartellino giallo per il terzino",
"Sostituzione"
];
for (var i = 0; i < 3; i++) {
var additionalAction = additionalActions[Math.floor(Math.random() * additionalActions.length)];
var minute = generateRandomMinute(usedMinutes);
usedMinutes.push(minute);
actions.push({ team: (i % 2 === 0) ? homeTeamName : awayTeamName, minute: minute, action: additionalAction });
}
actions.sort(function (a, b) {
return a.minute - b.minute;
});
var delay = 0;
for (var i = 0; i < actions.length; i++) {
setTimeout(function (action) {
if (action.player) {
actionsContainer.innerHTML += "<p class='goal-action'>Minuto: " + action.minute + " - " + action.team + ": " + action.player + " - GOAL!</p>";
} else {
actionsContainer.innerHTML += "<p>Minuto: " + action.minute + " - " + action.team + ": " + action.action + "</p>";
}
}, delay, actions[i]);
delay += 1000; // Delay di 1 secondo
}
setTimeout(function () {
resultContainer.innerHTML = "<p>Il risultato finale è " + homeGoals + "-" + awayGoals + " per " + homeTeamName + " contro " + awayTeamName + ".</p>";
}, delay);
}
</script>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-87485190555630552422023-06-30T03:57:00.263-07:002023-07-06T06:33:59.479-07:00prova
<html>
<head>
<title>Pronosticatore Percentuali Risultati Calcio</title>
<style>
.bold {
font-weight: bold;
}
.blue {
color: blue;
}
.green {
color: green;
}
.red {
color: red;
}
</style>
</head>
<body>
<h1><i>PronoPoisson By Robj</i></h1>
<h2>Inserisci i parametri:</h2>
<br />
<label for="squadraCasa">Squadra di casa:</label>
<input id="squadraCasa" required="" type="text" /><br />
<br />
<label for="squadraOspite">Squadra ospite:</label>
<input id="squadraOspite" required="" type="text" /><br />
<br />
<label for="ngc">Numero di partite giocate in casa dalla squadra di casa:</label>
<input id="ngc" required="" type="number" /><br />
<br />
<label for="gsc">Goal segnati in casa dalla squadra di casa:</label>
<input id="gsc" required="" type="number" /><br />
<br />
<label for="gsuc">Goal subiti in casa dalla squadra di casa:</label>
<input id="gsuc" required="" type="number" /><br />
<br />
<label for="ngo">Numero di partite giocate fuori casa dalla squadra ospite:</label>
<input id="ngo" required="" type="number" /><br />
<br />
<label for="gso">Goal segnati fuori casa dalla squadra ospite:</label>
<input id="gso" required="" type="number" /><br />
<br />
<label for="gsuo">Goal subiti fuori casa dalla squadra ospite:</label>
<input id="gsuo" required="" type="number" /><br />
<br />
Legenda valori in %: verde = molto probabile; blu= possibile; rosso= improbabile/incerto
<br />
<br />
<button onclick="calcolaPercentuali()">Calcola</button>
<button onclick="cancellaDati()">Cancella</button>
<br />
<script>
function calcolaPercentuali() {
// Codice per calcolare le percentuali
}
function cancellaDati() {
document.getElementById("squadraCasa").value = "";
document.getElementById("squadraOspite").value = "";
document.getElementById("ngc").value = "";
document.getElementById("gsc").value = "";
document.getElementById("gsuc").value = "";
document.getElementById("ngo").value = "";
document.getElementById("gso").value = "";
document.getElementById("gsuo").value = "";
}
</script>
<br />
<br />
<h2>Elaborazione dati:</h2>
<div id="risultati"></div>
<br />
<h2>% Correct Score:</h2>
<table id="tabella-risultati">
<thead>
<tr>
<th>Risultato</th>
<th>Probabilità</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<script>
function calcolaPercentuali() {
// Recupera i valori inseriti dall'utente
var NGC = parseInt(document.getElementById('ngc').value);
var GSC = parseInt(document.getElementById('gsc').value);
var GSUC = parseInt(document.getElementById('gsuc').value);
var NGO = parseInt(document.getElementById('ngo').value);
var GSO = parseInt(document.getElementById('gso').value);
var GSUO = parseInt(document.getElementById('gsuo').value);
// Effettua i calcoli necessari
var MGFC = GSC / NGC;
var MGSUC = GSUC / NGC;
var MGFO = GSO / NGO;
var MGSUO = GSUO / NGO;
var V1 = (MGFC + MGSUO) / 2;
var V2 = (MGSUC + MGFO) / 2;
var mediaGoalFattiCasa = GSC / NGC;
var mediaGoalSubitiCasa = GSUC / NGC;
var mediaGoalFattiOspite = GSO / NGO;
var mediaGoalSubitiOspite = GSUO / NGO;
var risultatiDiv = document.getElementById('risultati');
risultatiDiv.innerHTML = '';
// Visualizza le medie dei goal fatti e subiti per entrambe le squadre
risultatiDiv.innerHTML += '<h3>Media goal fatti e subiti:</h3>';
risultatiDiv.innerHTML += 'Media goal fatti squadra di casa: <span class="bold ' + getColoreValore(mediaGoalFattiCasa) + '">' + mediaGoalFattiCasa.toFixed(2) + '</span><br>';
risultatiDiv.innerHTML += 'Media goal subiti squadra di casa: <span class="bold ' + getColoreValore(mediaGoalSubitiCasa) + '">' + mediaGoalSubitiCasa.toFixed(2) + '</span><br>';
risultatiDiv.innerHTML += 'Media goal fatti squadra ospite: <span class="bold ' + getColoreValore(mediaGoalFattiOspite) + '">' + mediaGoalFattiOspite.toFixed(2) + '</span><br>';
risultatiDiv.innerHTML += 'Media goal subiti squadra ospite: <span class="bold ' + getColoreValore(mediaGoalSubitiOspite) + '">' + mediaGoalSubitiOspite.toFixed(2) + '</span><br><br>';
// Calcola e visualizza le percentuali dei goal segnati dalla squadra di casa
risultatiDiv.innerHTML += '<h3>% Goal segnati dalla squadra di casa:</h3>';
var percentualiCasa = [];
for (var i = 0; i <= 6; i++) {
var percentualeCasa = Math.exp(-V1) * Math.pow(V1, i) / factorial(i) * 100;
percentualiCasa.push(percentualeCasa);
risultatiDiv.innerHTML += i + ' goal: <span class="bold ' + getColorePercentuale(percentualeCasa) + '">' + percentualeCasa.toFixed(2) + '%</span><br>';
}
// Calcola e visualizza le percentuali dei goal segnati dalla squadra ospite
risultatiDiv.innerHTML += '<h3>% Goal segnati dalla squadra ospite:</h3>';
var percentualiOspite = [];
for (var j = 0; j <= 6; j++) {
var percentualeOspite = Math.exp(-V2) * Math.pow(V2, j) / factorial(j) * 100;
percentualiOspite.push(percentualeOspite);
risultatiDiv.innerHTML += j + ' goal: <span class="bold ' + getColorePercentuale(percentualeOspite) + '">' + percentualeOspite.toFixed(2) + '%</span><br>';
}
// Calcola e visualizza le percentuali di Segno 1, X e 2
var percentualeSegno1 = 0;
var percentualeSegnoX = 0;
var percentualeSegno2 = 0;
for (var i = 0; i <= 6; i++) {
for (var j = 0; j <= 6; j++) {
var sommaGoal = i + j;
var percentualeRisultato = (Math.exp(-V1) * Math.pow(V1, i) / factorial(i)) * (Math.exp(-V2) * Math.pow(V2, j) / factorial(j)) * 100;
if (i > j) {
percentualeSegno1 += percentualeRisultato;
} else if (i === j) {
percentualeSegnoX += percentualeRisultato;
} else {
percentualeSegno2 += percentualeRisultato;
}
}
}
risultatiDiv.innerHTML += '<h3>% 1/X/2:</h3>';
risultatiDiv.innerHTML += 'Segno 1: <span class="bold ' + getColorePercentualeSegno(percentualeSegno1) + '">' + percentualeSegno1.toFixed(2) + '%</span><br>';
risultatiDiv.innerHTML += 'Segno X: <span class="bold ' + getColorePercentualeSegno(percentualeSegnoX) + '">' + percentualeSegnoX.toFixed(2) + '%</span><br>';
risultatiDiv.innerHTML += 'Segno 2: <span class="bold ' + getColorePercentualeSegno(percentualeSegno2) + '">' + percentualeSegno2.toFixed(2) + '%</span><br>';
// Calcola e visualizza le percentuali di 1X, X2 e 12
var percentuale1X = percentualeSegno1 + percentualeSegnoX;
var percentualeX2 = percentualeSegnoX + percentualeSegno2;
var percentuale12 = percentualeSegno1 + percentualeSegno2;
risultatiDiv.innerHTML += '<h3>% DC 1X/X2/12:</h3>';
risultatiDiv.innerHTML += '1X: <span class="bold ' + getColorePercentualeSegno(percentuale1X) + '">' + percentuale1X.toFixed(2) + '%</span><br>';
risultatiDiv.innerHTML += 'X2: <span class="bold ' + getColorePercentualeSegno(percentualeX2) + '">' + percentualeX2.toFixed(2) + '%</span><br>';
risultatiDiv.innerHTML += '12: <span class="bold ' + getColorePercentualeSegno(percentuale12) + '">' + percentuale12.toFixed(2) + '%</span><br>';
// Funzione per ottenere il colore delle Percentuali di 1X, X2 e 12
function getColorePercentualeSegno(percentuale) {
if (percentuale > 70) {
return 'green';
} else if (percentuale >= 60 && percentuale <= 69.99) {
return 'blue';
} else {
return 'red';
}
}
// Calcola e visualizza le percentuali di Over 0,5 e Under 0,5
var percentualeUnder05 = (Math.exp(-V1) * Math.pow(V1, 0) / factorial(0)) * (Math.exp(-V2) * Math.pow(V2, 0) / factorial(0)) * 100;
var percentualeOver05 = 100 - percentualeUnder05;
var coloreUnder05 = "";
var coloreOver05 = "";
if (percentualeUnder05 > 80) {
coloreUnder05 = "green";
} else if (percentualeUnder05 >= 70 && percentualeUnder05 <= 79.99) {
coloreUnder05 = "blue";
} else {
coloreUnder05 = "red";
}
if (percentualeOver05 > 96) {
coloreOver05 = "green";
} else if (percentualeOver05 >= 92 && percentualeOver05 <= 95.99) {
coloreOver05 = "blue";
} else {
coloreOver05 = "red";
}
risultatiDiv.innerHTML += '<h3>% Over 0,5/Under 0,5:</h3>';
risultatiDiv.innerHTML += 'Over 0,5: <span class="bold" style="color: ' + coloreOver05 + ';">' + percentualeOver05.toFixed(2) + '%</span><br>';
risultatiDiv.innerHTML += 'Under 0,5: <span class="bold" style="color: ' + coloreUnder05 + ';">' + percentualeUnder05.toFixed(2) + '%</span><br>';
// Calcola e visualizza le percentuali di Over 1,5 e Under 1,5
var percentualeOver15 = 0;
var percentualeUnder15 = 0;
for (var i = 0; i <= 6; i++) {
for (var j = 0; j <= 6; j++) {
var sommaGoal = i + j;
var percentualeRisultato = (Math.exp(-V1) * Math.pow(V1, i) / factorial(i)) * (Math.exp(-V2) * Math.pow(V2, j) / factorial(j)) * 100;
if (sommaGoal > 1) {
percentualeOver15 += percentualeRisultato;
}
// Aggiungi altre condizioni per calcolare eventuali altre somme goal desiderate
// Esempio: if (sommaGoal > 2) { ... }
}
}
percentualeUnder15 = 100 - percentualeOver15;
risultatiDiv.innerHTML += '<h3>% Over 1,5/Under 1,5:</h3>';
risultatiDiv.innerHTML += 'Over 1,5: <span class="bold ' + getColorePercentualeOver15(percentualeOver15) + '">' + percentualeOver15.toFixed(2) + '%</span><br>';
risultatiDiv.innerHTML += 'Under 1,5: <span class="bold ' + getColorePercentualeUnder15(percentualeUnder15) + '">' + percentualeUnder15.toFixed(2) + '%</span><br>';
// Funzione per ottenere il colore delle Percentuali di Over 1,5
function getColorePercentualeOver15(percentuale) {
if (percentuale > 76) {
return 'green';
} else if (percentuale >= 73 && percentuale <= 75.99) {
return 'blue';
} else {
return 'red';
}
}
// Funzione per ottenere il colore delle Percentuali di Under 1,5
function getColorePercentualeUnder15(percentuale) {
if (percentuale > 76) {
return 'green';
} else if (percentuale >= 73 && percentuale <= 75.99) {
return 'blue';
} else {
return 'red';
}
}
// Calcola e visualizza le percentuali di Over 2,5 e Under 2,5
var percentualeOver = 0;
var percentualeUnder = 0;
for (var i = 0; i <= 6; i++) {
for (var j = 0; j <= 6; j++) {
var sommaGoal = i + j;
var percentualeRisultato = (Math.exp(-V1) * Math.pow(V1, i) / factorial(i)) * (Math.exp(-V2) * Math.pow(V2, j) / factorial(j)) * 100;
if (sommaGoal > 2) {
percentualeOver += percentualeRisultato;
}
// Aggiungi altre condizioni per calcolare eventuali altre somme goal desiderate
// Esempio: if (sommaGoal > 3) { ... }
}
}
percentualeUnder = 100 - percentualeOver;
risultatiDiv.innerHTML += '<h3>% Over 2,5/Under 2,5:</h3>';
risultatiDiv.innerHTML += 'Over 2,5: <span class="bold ' + getColorePercentualeOver(percentualeOver) + '">' + percentualeOver.toFixed(2) + '%</span><br>';
risultatiDiv.innerHTML += 'Under 2,5: <span class="bold ' + getColorePercentualeUnder(percentualeUnder) + '">' + percentualeUnder.toFixed(2) + '%</span><br>';
// Funzione per ottenere il colore delle Percentuali di Over 2,5
function getColorePercentualeOver(percentuale) {
if (percentuale > 57) {
return 'green';
} else if (percentuale >= 51 && percentuale <= 56.99) {
return 'blue';
} else {
return 'red';
}
}
// Funzione per ottenere il colore delle Percentuali di Under 2,5
function getColorePercentualeUnder(percentuale) {
if (percentuale > 57) {
return 'green';
} else if (percentuale >= 51 && percentuale <= 56.99) {
return 'blue';
} else {
return 'red';
}
}
// Calcola e visualizza le percentuali di Over 3,5 e Under 3,5
var percentualeOver35 = 0;
var percentualeUnder35 = 0;
for (var i = 0; i <= 6; i++) {
for (var j = 0; j <= 6; j++) {
var sommaGoal = i + j;
var percentualeRisultato = (Math.exp(-V1) * Math.pow(V1, i) / factorial(i)) * (Math.exp(-V2) * Math.pow(V2, j) / factorial(j)) * 100;
if (sommaGoal > 3) {
percentualeOver35 += percentualeRisultato;
}
// Aggiungi altre condizioni per calcolare eventuali altre somme goal desiderate
// Esempio: if (sommaGoal > 4) { ... }
}
}
percentualeUnder35 = 100 - percentualeOver35;
risultatiDiv.innerHTML += '<h3>% Over 3,5/Under 3,5:</h3>';
risultatiDiv.innerHTML += 'Over 3,5: <span class="bold ' + getColorePercentualeOver35(percentualeOver35) + '">' + percentualeOver35.toFixed(2) + '%</span><br>';
risultatiDiv.innerHTML += 'Under 3,5: <span class="bold ' + getColorePercentualeUnder35(percentualeUnder35) + '">' + percentualeUnder35.toFixed(2) + '%</span><br>';
// Funzione per ottenere il colore delle Percentuali di Over 3,5
function getColorePercentualeOver35(percentuale) {
if (percentuale > 50) {
return 'green';
} else if (percentuale >= 35 && percentuale <= 49.99) {
return 'blue';
} else {
return 'red';
}
}
// Funzione per ottenere il colore delle Percentuali di Under 3,5
function getColorePercentualeUnder35(percentuale) {
if (percentuale > 50) {
return 'green';
} else if (percentuale >= 35 && percentuale <= 49.99) {
return 'blue';
} else {
return 'red';
}
}
// Calcola e visualizza le percentuali di Goal e No Goal
var percentualeGoal = 0;
var percentualeNoGoal = 0;
for (var i = 0; i <= 6; i++) {
for (var j = 0; j <= 6; j++) {
var percentualeRisultato = (Math.exp(-V1) * Math.pow(V1, i) / factorial(i)) * (Math.exp(-V2) * Math.pow(V2, j) / factorial(j)) * 100;
if (i > 0 && j > 0) {
percentualeGoal += percentualeRisultato;
} else {
percentualeNoGoal += percentualeRisultato;
}
// Aggiungi altre condizioni per calcolare eventuali altre situazioni desiderate
// Esempio: if (i > 1 && j > 1) { ... }
}
}
risultatiDiv.innerHTML += '<h3>% Goal/No Goal:</h3>';
risultatiDiv.innerHTML += 'Goal: <span class="bold ' + getColorePercentualeGoal(percentualeGoal) + '">' + percentualeGoal.toFixed(2) + '%</span><br>';
risultatiDiv.innerHTML += 'No Goal: <span class="bold ' + getColorePercentualeNoGoal(percentualeNoGoal) + '">' + percentualeNoGoal.toFixed(2) + '%</span><br>';
// Funzione per ottenere il colore delle Percentuali di Goal
function getColorePercentualeGoal(percentuale) {
if (percentuale > 57) {
return 'green';
} else if (percentuale >= 51 && percentuale <= 56.99) {
return 'blue';
} else {
return 'red';
}
}
// Funzione per ottenere il colore delle Percentuali di No Goal
function getColorePercentualeNoGoal(percentuale) {
if (percentuale > 57) {
return 'green';
} else if (percentuale >= 51 && percentuale <= 56.99) {
return 'blue';
} else {
return 'red';
}
}
// Calcola e visualizza le percentuali di Goal Home e Goal Away
var percentualeGoalHome = 0;
var percentualeGoalAway = 0;
for (var i = 0; i <= 6; i++) {
for (var j = 0; j <= 6; j++) {
var percentualeRisultato = (Math.exp(-V1) * Math.pow(V1, i) / factorial(i)) * (Math.exp(-V2) * Math.pow(V2, j) / factorial(j)) * 100;
if (i > 0) {
percentualeGoalHome += percentualeRisultato;
}
if (j > 0) {
percentualeGoalAway += percentualeRisultato;
}
// Aggiungi altre condizioni per calcolare eventuali altre situazioni desiderate
// Esempio: if (i > 1) { ... }
}
}
risultatiDiv.innerHTML += '<h3>% Goal Home/Goal Away:</h3>';
risultatiDiv.innerHTML += 'Goal Home: <span class="bold ' + getColorePercentualeGoalHome(percentualeGoalHome) + '">' + percentualeGoalHome.toFixed(2) + '%</span><br>';
risultatiDiv.innerHTML += 'Goal Away: <span class="bold ' + getColorePercentualeGoalAway(percentualeGoalAway) + '">' + percentualeGoalAway.toFixed(2) + '%</span><br>';
// Funzione per ottenere il colore delle Percentuali di Goal Home
function getColorePercentualeGoalHome(percentuale) {
if (percentuale > 82) {
return 'green';
} else if (percentuale >= 72 && percentuale <= 81.99) {
return 'blue';
} else {
return 'red';
}
}
// Funzione per ottenere il colore delle Percentuali di Goal Away
function getColorePercentualeGoalAway(percentuale) {
if (percentuale > 82) {
return 'green';
} else if (percentuale >= 72 && percentuale <= 81.99) {
return 'blue';
} else {
return 'red';
}
}
// Calcola e visualizza le percentuali di somma goal 0, 1, 2, 3, 4, 5, e 6
var percentualeSommaGoal = [0, 0, 0, 0, 0, 0, 0];
for (var i = 0; i <= 6; i++) {
for (var j = 0; j <= 6; j++) {
var percentualeRisultato = (Math.exp(-V1) * Math.pow(V1, i) / factorial(i)) * (Math.exp(-V2) * Math.pow(V2, j) / factorial(j)) * 100;
var sommaGoal = i + j;
percentualeSommaGoal[sommaGoal] += percentualeRisultato;
}
}
risultatiDiv.innerHTML += '<h3>% Somma Goal:</h3>';
for (var k = 0; k <= 6; k++) {
var percentuale = percentualeSommaGoal[k].toFixed(2);
var colore = "";
if (percentuale > 16) {
colore = "green";
} else if (percentuale >= 12 && percentuale <= 15.99) {
colore = "blue";
} else {
colore = "red";
}
risultatiDiv.innerHTML += 'Somma goal ' + k + ': <span class="bold" style="color: ' + colore + ';">' + percentuale + '%</span><br>';
}
// Genera la tabella delle combinazioni di risultati
var tabella = document.getElementById('tabella-risultati');
var tbody = tabella.getElementsByTagName('tbody')[0];
tbody.innerHTML = '';
for (var i = 0; i <= 6; i++) {
for (var j = 0; j <= 6; j++) {
var risultato = i + '-' + j;
var probabilita = (Math.exp(-V1) * Math.pow(V1, i) / factorial(i)) * (Math.exp(-V2) * Math.pow(V2, j) / factorial(j)) * 100;
tbody.innerHTML += '<tr><td>' + risultato + '</td><td class="bold ' + getColorePercentuale(probabilita) + '">' + probabilita.toFixed(2) + '%</td></tr>';
}
}
}
function factorial(n) {
if (n === 0 || n === 1) {
return 1;
}
return n * factorial(n - 1);
}
function getColorePercentuale(percentuale) {
if (percentuale >= 15) {
return 'green';
} else if (percentuale <= 6) {
return 'red';
} else {
return 'blue';
}
}
function getColoreValore(valore) {
if (valore > 1.5) {
return 'green';
} else if (valore < 0.99) {
return 'red';
} else {
return 'blue';
}
}
</script>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-25580377402765486362023-06-28T12:24:00.003-07:002023-06-28T12:30:43.692-07:00simulazione trotto<!DOCTYPE html>
<html>
<head>
<title>Simulatore di pronostici</title>
<style>
.green {
color: green;
}
.red {
color: red;
}
</style>
<script>
function simulaPronostico() {
var pronostico = document.getElementById("pronostico").value;
var numEstrazioni = 7;
var stakeIniziale = 2;
// Imposta la sequenza degli stake per le estrazioni successive
var sequenzaStake = [2, 6, 16, 45, 65, 90, 180];
var saldo = 0;
var estrazioneInterval = setInterval(function() {
if (numEstrazioni > 0) {
numEstrazioni--;
var risultatoHTML = ""; // Stringa per contenere l'HTML del risultato
// Genera un numero casuale tra 0 e 1
var risultato = Math.random();
if (risultato <= 0.44) {
var vincita = stakeIniziale;
saldo += vincita;
risultatoHTML = "<p class='green'>Estrazione " + (7 - numEstrazioni) + ": GOAL! Vincita: " + vincita.toFixed(2) + "</p>";
stakeIniziale = 2; // Riparti da 2 euro in caso di vittoria
} else {
saldo -= stakeIniziale;
risultatoHTML = "<p class='red'>Estrazione " + (7 - numEstrazioni) + ": Il risultato è rimasto invariato. Scommessa persa: " + stakeIniziale.toFixed(2) + "</p>";
// Verifica se la routine è terminata in perdita
if (numEstrazioni === 1 && stakeIniziale === 180) {
clearInterval(estrazioneInterval);
risultatoHTML += "<p class='red'>Routine terminata in perdita!</p>";
} else {
// Calcola lo stake per la prossima estrazione in caso di sconfitta
stakeIniziale = sequenzaStake[7 - numEstrazioni - 1];
}
}
document.getElementById("risultato").innerHTML += risultatoHTML;
} else {
clearInterval(estrazioneInterval);
var saldoHTML = "<strong>Risultato finale:</strong><br>" +
"Saldo finale: " + saldo.toFixed(2);
document.getElementById("risultato").innerHTML += saldoHTML;
}
}, 1000); // Intervallo di 1 secondo tra le estrazioni
}
function resettaSimulatore() {
document.getElementById("pronostico").selectedIndex = 0;
document.getElementById("risultato").innerHTML = "";
}
</script>
</head>
<body>
<h1>Simulatore di pronostici</h1>
<form>
<label for="pronostico">Scegli il pronostico:</label>
<select id="pronostico">
<option value="Over 0,5">Over 0,5</option>
<option value="Over 1,5">Over 1,5</option>
<option value="Over 2,5">Over 2,5</option>
<option value="Over 3,5">Over 3,5</option>
<option value="Over 4,5">Over 4,5</option>
</select>
<button type="button" onclick="simulaPronostico()">Simula</button>
<button type="button" onclick="resettaSimulatore()">Resetta</button>
</form>
<div id="risultato"></div>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-47502150769143492782023-06-28T10:37:00.014-07:002023-06-28T11:50:48.570-07:00sistema<!DOCTYPE html>
<html>
<head>
<title>Simulatore di pronostici</title>
<style>
.green {
color: green;
}
.red {
color: red;
}
</style>
<script>
function simulaPronostico() {
var pronostico = document.getElementById("pronostico").value;
var numEstrazioni = parseInt(document.getElementById("numEstrazioni").value);
// Calcola la probabilità di goal (44%) e probabilità opposta (56%)
var probabilitaGoal = 0.44;
var probabilitaOpposta = 0.56;
var conteggioGoal = 0;
var conteggioRimastoInvariato = 0;
var estrazioniEffettuate = 0;
var estrazioneInterval = setInterval(function() {
if (estrazioniEffettuate < numEstrazioni) {
var numeroEstrazione = estrazioniEffettuate + 1; // Numero di estrazione corrente
// Genera un numero casuale tra 0 e 1
var risultato = Math.random();
var risultatoHTML = ""; // Stringa per contenere l'HTML del risultato
if (pronostico === "Over 0,5") {
if (risultato <= probabilitaGoal) {
conteggioGoal++;
risultatoHTML = "<p class='green'>Estrazione " + numeroEstrazione + ": GOAL!</p>";
} else {
conteggioRimastoInvariato++;
risultatoHTML = "<p class='red'>Estrazione " + numeroEstrazione + ": Il risultato è rimasto invariato.</p>";
}
} else if (pronostico === "Over 1,5") {
// ...
} else if (pronostico === "Over 2,5") {
// ...
} else if (pronostico === "Over 3,5") {
// ...
} else if (pronostico === "Over 4,5") {
// ...
}
document.getElementById("risultato").innerHTML += risultatoHTML;
estrazioniEffettuate++;
} else {
clearInterval(estrazioneInterval);
var percentualeGoal = (conteggioGoal / numEstrazioni) * 100;
var percentualeRimastoInvariato = (conteggioRimastoInvariato / numEstrazioni) * 100;
document.getElementById("risultato").innerHTML += "<strong>Risultati finali:</strong><br>" +
"GOAL!: " + conteggioGoal + " (" + percentualeGoal.toFixed(2) + "%)<br>" +
"Il risultato è rimasto invariato: " + conteggioRimastoInvariato + " (" + percentualeRimastoInvariato.toFixed(2) + "%)";
}
}, 1000); // Intervallo di 1 secondo tra le estrazioni
}
function resettaSimulatore() {
document.getElementById("pronostico").selectedIndex = 0;
document.getElementById("numEstrazioni").value = "";
document.getElementById("risultato").innerHTML = "";
}
</script>
</head>
<body>
<h1>Simulatore di pronostici</h1>
<form>
<label for="pronostico">Scegli il pronostico:</label>
<select id="pronostico">
<option value="Over 0,5">Over 0,5</option>
<option value="Over 1,5">Over 1,5</option>
<option value="Over 2,5">Over 2,5</option>
<option value="Over 3,5">Over 3,5</option>
<option value="Over 4,5">Over 4,5</option>
</select>
<label for="numEstrazioni">Numero di estrazioni:</label>
<input type="number" id="numEstrazioni" min="1" max="20" required>
<button type="button" onclick="simulaPronostico()">Simula</button>
<button type="button" onclick="resettaSimulatore()">Resetta</button>
</form>
<div id="risultato"></div>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-1523714475932540642023-06-27T02:40:00.007-07:002023-06-27T06:59:45.319-07:00pmensile<head>
<title>Calcolatore di Profitto Mensile</title>
<style>
table {
border-collapse: collapse;
width: 100%;
}
th, td {
border: 1px solid black;
padding: 8px;
text-align: center;
}
.blue-button {
background-color: #2196F3;
color: white;
}
.red-button {
background-color: #FF0000;
color: white;
}
.lightgreen-row {
background-color: lightgreen;
}
#guadagnoNetto {
font-weight: bold;
font-size: larger;
}
</style>
<script>
function calcolaProfitto() {
var importoIniziale = parseFloat(document.getElementById("importoIniziale").value);
var percentualeIncremento = parseFloat(document.getElementById("percentualeIncremento").value);
var guadagnoTotale = 0;
var sumProfitti = 0;
var table = document.getElementById("risultatiTable");
table.innerHTML = ""; // Resetta la tabella ad ogni calcolo
var headerRow = table.insertRow();
var headerCell1 = headerRow.insertCell(0);
var headerCell2 = headerRow.insertCell(1);
var headerCell3 = headerRow.insertCell(2);
var headerCell4 = headerRow.insertCell(3);
headerCell1.innerHTML = "Giorno";
headerCell2.innerHTML = "Saldo Iniziale";
headerCell3.innerHTML = "Profitto Giornaliero";
headerCell4.innerHTML = "Saldo di Chiusura";
var row = table.insertRow();
var cell1 = row.insertCell(0);
var cell2 = row.insertCell(1);
var cell3 = row.insertCell(2);
var cell4 = row.insertCell(3);
cell1.innerHTML = "1";
cell2.innerHTML = importoIniziale.toFixed(2) + " €";
cell3.innerHTML = (importoIniziale * percentualeIncremento / 100).toFixed(2) + " €";
cell4.innerHTML = (importoIniziale + (importoIniziale * percentualeIncremento / 100)).toFixed(2) + " €";
guadagnoTotale = importoIniziale * percentualeIncremento / 100;
sumProfitti = guadagnoTotale;
if (sumProfitti >= (importoIniziale * 3)) {
row.classList.add("lightgreen-row");
}
for (var i = 2; i <= 30; i++) {
importoIniziale += guadagnoTotale;
guadagnoTotale = importoIniziale * percentualeIncremento / 100;
sumProfitti += guadagnoTotale;
var row = table.insertRow();
var cell1 = row.insertCell(0);
var cell2 = row.insertCell(1);
var cell3 = row.insertCell(2);
var cell4 = row.insertCell(3);
cell1.innerHTML = i;
cell2.innerHTML = importoIniziale.toFixed(2) + " €";
cell3.innerHTML = guadagnoTotale.toFixed(2) + " €";
cell4.innerHTML = (importoIniziale + guadagnoTotale).toFixed(2) + " €";
if (sumProfitti >= (importoIniziale * 3)) {
row.classList.add("lightgreen-row");
}
}
var guadagnoNetto = sumProfitti.toFixed(2);
document.getElementById("guadagnoNetto").innerHTML = "<span style='font-size: larger; font-weight: bold;'>" + guadagnoNetto + "</span> €";
}
function resettaCalcolatore() {
document.getElementById("importoIniziale").value = "";
document.getElementById("percentualeIncremento").value = "";
document.getElementById("risultatiTable").innerHTML = "";
document.getElementById("guadagnoNetto").innerHTML = "";
}
</script>
</head>
<body>
<h1>Calcolatore di Profitto Mensile</h1>
<label for="importoIniziale">Importo da investire:</label>
<input id="importoIniziale" required="" step="0.01" type="number" /><br /><br />
<label for="percentualeIncremento">Percentuale di incremento giornaliero:</label>
<input id="percentualeIncremento" required="" step="0.01" type="number" /><br /><br />
<button class="blue-button" onclick="calcolaProfitto()">Calcola Profitto</button>
<button class="red-button" onclick="resettaCalcolatore()">Resetta</button><br /><br />
<table id="risultatiTable">
<!-- Intestazione della tabella -->
<tr>
<th>Giorno</th>
<th>Saldo Iniziale</th>
<th>Profitto Giornaliero</th>
<th>Saldo di Chiusura</th>
</tr>
</table><br /><br />
<label><b>Guadagno netto:</b></label>
<span id="guadagnoNetto"></span><br /><br />
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-40795075846361181642023-06-25T14:42:00.036-07:002023-07-06T14:27:01.274-07:00multiplona<!DOCTYPE html>
<html>
<head>
<title>Schedina di 9 partite</title>
<style>
table {
border-collapse: collapse;
}
td, th {
border: 1px solid black;
padding: 8px;
text-align: center;
}
input[type="text"] {
width: 100%;
box-sizing: border-box;
}
input[type="button"] {
margin-top: 10px;
}
</style>
</head>
<body>
<h1>Schedina di 9 partite</h1>
<form id="schedinaForm">
<table>
<tr>
<th>Partita</th>
<th>Squadre</th>
<th>Pronostico</th>
<th>Quota</th>
</tr>
<tr>
<td>1</td>
<td><input type="text" name="squadra1" /></td>
<td><span id="pronostico1"></span></td>
<td><input type="text" name="quota1" /></td>
</tr>
<!-- Aggiungi qui le altre righe per le partite -->
</table>
<input type="button" value="Compila Prono" onclick="compilaPronostici()" id="compilaPronoButton" />
<input type="button" value="Aggiungi Partita" onclick="aggiungiPartita()" id="aggiungiPartitaButton" />
<input type="button" value="Reset" onclick="resetForm()" />
<input type="button" value="Calcola" onclick="calcola()" />
<input type="button" value="Crea Bollette" onclick="creaBollette()" />
<p>Quota Totale: <span id="quotaTotale">0</span></p>
</form>
<div id="bolletteContainer"></div>
<script>
var partiteCaricate = 1;
var pronosticiCompilati = false;
var pronostici = ["GG", "NG", "OV2,5", "OV1,5", "UN3,5", "1X", "12", "X2", "MG2-3","Goal Home","Ov0,5 2t"];
var bolletteContainer = document.getElementById("bolletteContainer");
function compilaPronostici() {
pronosticiCompilati = true;
document.getElementById("compilaPronoButton").disabled = true;
for (var i = 1; i <= partiteCaricate; i++) {
var pronosticoIndex = Math.floor(Math.random() * pronostici.length);
var pronosticoElement = document.getElementById("pronostico" + i);
pronosticoElement.textContent = pronostici[pronosticoIndex];
}
}
function aggiungiPartita() {
if (partiteCaricate < 9) {
partiteCaricate++;
var table = document.querySelector("table");
var rowCount = table.rows.length;
var newRow = table.insertRow(rowCount);
var partitaCell = newRow.insertCell(0);
partitaCell.textContent = rowCount;
var squadraCell = newRow.insertCell(1);
squadraCell.innerHTML = '<input type="text" name="squadra' + rowCount + '" />';
var pronosticoCell = newRow.insertCell(2);
pronosticoCell.innerHTML = '<span id="pronostico' + rowCount + '"></span>';
var quotaCell = newRow.insertCell(3);
quotaCell.innerHTML = '<input type="text" name="quota' + rowCount + '" />';
}
if (partiteCaricate === 9) {
document.getElementById("aggiungiPartitaButton").disabled = true;
document.getElementById("compilaPronoButton").disabled = false;
}
}
function resetForm() {
document.getElementById("schedinaForm").reset();
document.getElementById("quotaTotale").textContent = "0";
partiteCaricate = 1;
pronosticiCompilati = false;
document.getElementById("compilaPronoButton").disabled = false;
document.getElementById("aggiungiPartitaButton").disabled = false;
for (var i = 1; i <= 9; i++) {
document.getElementById("pronostico" + i).textContent = "";
}
bolletteContainer.innerHTML = "";
}
function calcola() {
document.getElementById("compilaPronoButton").disabled = true;
document.getElementById("aggiungiPartitaButton").disabled = true;
var k = [];
for (var i = 1; i <= partiteCaricate; i++) {
var quotaInput = document.getElementsByName("quota" + i)[0];
var quota = parseFloat(quotaInput.value);
k.push(quota);
}
var quotaTotale = k.reduce(function(a, b) {
return a * b;
}, 1);
document.getElementById("quotaTotale").textContent = quotaTotale.toFixed(2);
}
function creaBollette() {
bolletteContainer.innerHTML = "";
var bollette = [
{ nome: "Bolletta 1", partite: [1, 2, 3] },
{ nome: "Bolletta 2", partite: [4, 5, 6, 7] },
{ nome: "Bolletta 3", partite: [1, 3, 6, 7] },
{ nome: "Bolletta Integrale", partite: [1, 2, 3, 4, 5, 6, 7, 8, 9] }
];
for (var i = 0; i < bollette.length; i++) {
var bolletta = bollette[i];
var nomeBolletta = bolletta.nome;
var partiteBolletta = bolletta.partite;
var table = document.createElement("table");
var headerRow = document.createElement("tr");
var headerCell1 = document.createElement("th");
headerCell1.textContent = "Partita";
var headerCell2 = document.createElement("th");
headerCell2.textContent = "Squadre";
var headerCell3 = document.createElement("th");
headerCell3.textContent = "Pronostico";
var headerCell4 = document.createElement("th");
headerCell4.textContent = "Quota";
headerRow.appendChild(headerCell1);
headerRow.appendChild(headerCell2);
headerRow.appendChild(headerCell3);
headerRow.appendChild(headerCell4);
table.appendChild(headerRow);
for (var j = 0; j < partiteBolletta.length; j++) {
var partitaIndex = partiteBolletta[j];
var row = document.createElement("tr");
var partitaCell = document.createElement("td");
partitaCell.textContent = partitaIndex;
var squadraCell = document.createElement("td");
var squadraInput = document.querySelector('input[name="squadra' + partitaIndex + '"]');
squadraCell.textContent = squadraInput.value;
var pronosticoCell = document.createElement("td");
var pronosticoSpan = document.getElementById("pronostico" + partitaIndex);
pronosticoCell.textContent = pronosticoSpan.textContent;
var quotaCell = document.createElement("td");
var quotaInput = document.querySelector('input[name="quota' + partitaIndex + '"]');
quotaCell.textContent = quotaInput.value;
row.appendChild(partitaCell);
row.appendChild(squadraCell);
row.appendChild(pronosticoCell);
row.appendChild(quotaCell);
table.appendChild(row);
}
var quotaTotale = calcolaQuotaTotaleBolletta(partiteBolletta);
var quotaTotaleRow = document.createElement("tr");
var quotaTotaleCell = document.createElement("td");
quotaTotaleCell.setAttribute("colspan", "4");
quotaTotaleCell.textContent = "Quota Totale: " + quotaTotale.toFixed(2);
quotaTotaleRow.appendChild(quotaTotaleCell);
table.appendChild(quotaTotaleRow);
var bollettaContainer = document.createElement("div");
bollettaContainer.classList.add("bolletta-container");
bollettaContainer.innerHTML = "<h3>" + nomeBolletta + "</h3>";
bollettaContainer.appendChild(table);
bolletteContainer.appendChild(bollettaContainer);
}
}
function calcolaQuotaTotaleBolletta(partiteBolletta) {
var quotaTotale = 1;
for (var i = 0; i < partiteBolletta.length; i++) {
var partitaIndex = partiteBolletta[i];
var quotaInput = document.querySelector('input[name="quota' + partitaIndex + '"]');
var quota = parseFloat(quotaInput.value);
quotaTotale *= quota;
}
return quotaTotale;
}
</script>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-87097869309885341822023-06-25T03:09:00.025-07:002023-07-04T23:54:34.706-07:00calcolatore 3 entrate<!DOCTYPE html>
<html>
<head>
<title>Calcolatore di vincite</title>
</head>
<body>
<h1><i>Calcolatore Quota Split Over by Robj</i></h1>
<br />
<form id="calcolatore-form">
<label for="partita">Nome della partita:</label>
<input id="partita" name="partita" required="" type="text" /><br /><br />
<label for="pronostico">Pronostico:</label>
<select id="pronostico" name="pronostico" required="">
<option value="">Seleziona pronostico</option>
<option value="0.5">Over 0,5</option>
<option value="1.5">Over 1,5</option>
<option value="2.5">Over 2,5</option>
<option value="3.5">Over 3,5</option>
<option value="4.5">Over 4,5</option>
</select><br /><br />
<label for="quota1">Quota 1 entrata:</label>
<input id="quota1" name="quota1" required="" step="0.01" type="number" />
<br/>
<label for="importo1">Importo:</label>
<input id="importo1" name="importo1" required="" step="0.01" type="number" /><br /><br />
<label for="quota2">Quota 2 entrata:</label>
<input id="quota2" name="quota2" required="" step="0.01" type="number" />
<br/>
<label for="importo2">Importo:</label>
<input id="importo2" name="importo2" required="" step="0.01" type="number" /><br /><br />
<label for="quota3">Quota 3 entrata:</label>
<input id="quota3" name="quota3" required="" step="0.01" type="number" />
<br/>
<label for="importo3">Importo:</label>
<input id="importo3" name="importo3" required="" step="0.01" type="number" /><br /><br />
<p>Importo totale: <span id="importo-totale"></span></p>
<p>Guadagno netto: <span id="guadagno-netto"></span></p>
<br />
<input type="submit" value="Calcola quota totale" />
<input onclick="resetForm()" type="button" value="Cancella" />
</form>
<br />
<div id="risultato" style="display: none;">
<h2>Elaborazione Quota:</h2>
<p>Quota totale: <span id="quota-totale"></span></p>
</div>
<script>
function resetForm() {
document.getElementById("calcolatore-form").reset();
document.getElementById('risultato').style.display = 'none';
}
document.getElementById('calcolatore-form').addEventListener('submit', function(event) {
event.preventDefault();
var pronostico = parseFloat(document.getElementById('pronostico').value);
var importo1 = parseFloat(document.getElementById('importo1').value);
var quota1 = parseFloat(document.getElementById('quota1').value);
var importo2 = parseFloat(document.getElementById('importo2').value);
var quota2 = parseFloat(document.getElementById('quota2').value);
var importo3 = parseFloat(document.getElementById('importo3').value);
var quota3 = parseFloat(document.getElementById('quota3').value);
var importoTotale = importo1 + importo2 + importo3;
var guadagnoNetto = (importo1 * quota1) + (importo2 * quota2) + (importo3 * quota3) - importoTotale;
var quotaTotale = (1 + (guadagnoNetto / importoTotale)).toFixed(2);
document.getElementById('quota-totale').textContent = quotaTotale;
document.getElementById('importo-totale').textContent = importoTotale.toFixed(2);
document.getElementById('guadagno-netto').textContent = guadagnoNetto.toFixed(2);
document.getElementById('risultato').style.display = 'block';
});
</script>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-68398657304638908382023-06-24T14:47:00.004-07:002023-06-24T14:57:56.293-07:00provax<!DOCTYPE html>
<html>
<head>
<title>Menu a tendina con squadre di calcio</title>
</head>
<body>
<h2>Seleziona una squadra:</h2>
<select id="squadre" onchange="mostraStemma()">
<option value="" disabled selected>Scegli una squadra</option>
<option value="juventus">Juventus</option>
<option value="milan">Milan</option>
<option value="inter">Inter</option>
<option value="roma">Roma</option>
<!-- Aggiungi altre squadre come opzioni -->
</select>
<br><br>
<img id="stemma" src="" alt="Stemma squadra">
<script>
function mostraStemma() {
var squadra = document.getElementById("squadre").value;
var stemma = document.getElementById("stemma");
// Imposta l'URL dell'immagine dello stemma in base alla squadra selezionata
switch (squadra) {
case "juventus":
stemma.src = "";
break;
case "milan":
stemma.src = "url_dello_stemma_milan.jpg";
break;
case "inter":
stemma.src = "url_dello_stemma_inter.jpg";
break;
case "roma":
stemma.src = "url_dello_stemma_roma.jpg";
break;
// Aggiungi altre squadre con i rispettivi URL degli stemmi
default:
stemma.src = "";
}
}
</script>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-38922617553140622292023-06-22T13:14:00.051-07:002023-09-06T06:20:12.388-07:00algo 1x2
<html>
<head>
<title>Pronosticatore</title>
<style>
em {
font-style: italic;
}
strong {
font-weight: bold;
}
</style>
<script>
var partite = [];
var pronosticoElaborato = false;
function elaboraPronostico() {
var serieA = document.getElementById("serieA").value;
var squadraOspiteSerieA = document.getElementById("squadraOspiteSerieA").value;
var serieB = document.getElementById("serieB").value;
var squadraOspiteSerieB = document.getElementById("squadraOspiteSerieB").value;
var bundesliga = document.getElementById("bundesliga").value;
var squadraOspiteBundesliga = document.getElementById("squadraOspiteBundesliga").value;
var premierLeague = document.getElementById("premierLeague").value;
var squadraOspitePremierLeague = document.getElementById("squadraOspitePremierLeague").value;
var pronosticoSerieA = getRndPrediction("Over 1,5", "Goal", "Over 2,5", "Under 3,5");
var pronosticoSerieB = getRndPrediction("X/Under 2,5", "Goal/Over 1,5", "Under 2,5/Goal", "MG2-3/Pari", "Pari/1");
var pronosticoBundesliga = getRndPrediction("Over 2,5/Goal", "Goal/1", "MG 2-4/Dispari");
var pronosticoPremierLeague = getRndPrediction("Goal", "Over 2,5", "Over 1,5", "Dispari");
var partitaSerieA = "Serie A: " + "<em>" + serieA + "</em>" + " - " + "<em>" + squadraOspiteSerieA + "</em>" + " " + "<strong>" + pronosticoSerieA + "</strong>";
var partitaSerieB = "Serie B: " + "<em>" + serieB + "</em>" + " - " + "<em>" + squadraOspiteSerieB + "</em>" + " " + "<strong>" + pronosticoSerieB + "</strong>";
var partitaBundesliga = "Bundesliga: " + "<em>" + bundesliga + "</em>" + " - " + "<em>" + squadraOspiteBundesliga + "</em>" + " " + "<strong>" + pronosticoBundesliga + "</strong>";
var partitaPremierLeague = "Premier League: " + "<em>" + premierLeague + "</em>" + " - " + "<em>" + squadraOspitePremierLeague + "</em>" + " " + "<strong>" + pronosticoPremierLeague + "</strong>";
partite.push(partitaSerieA);
partite.push(partitaSerieB);
partite.push(partitaBundesliga);
partite.push(partitaPremierLeague);
displayPartite();
pronosticoElaborato = true;
document.getElementById("elaboraButton").disabled = true;
}
function clearPronostico() {
partite = [];
displayPartite();
pronosticoElaborato = false;
document.getElementById("elaboraButton").disabled = false;
}
function getRndPrediction(...predictions) {
var randomIndex = Math.floor(Math.random() * predictions.length);
return predictions[randomIndex];
}
function displayPartite() {
var partiteList = document.getElementById("partiteList");
partiteList.innerHTML = "";
for (var i = 0; i < partite.length; i++) {
var partita = partite[i];
var listItem = document.createElement("li");
listItem.innerHTML = partita;
partiteList.appendChild(listItem);
}
}
</script>
</head>
<body>
<h1>Pronosticatore</h1>
<h2>Serie A</h2>
<label for="serieA">Squadra di casa:</label>
<select id="serieA">
<option value="Atalanta">Atalanta</option>
<option value="Bologna">Bologna</option>
<option value="Cagliari">Cagliari</option>
<option value="Empoli">Empoli</option>
<option value="Fiorentina">Fiorentina</option>
<option value="Frosinone">Frosinone</option>
<option value="Genoa">Genoa</option>
<option value="Inter">Inter</option>
<option value="Juventus">Juventus</option>
<option value="Lazio">Lazio</option>
<option value="Lecce">Lecce</option>
<option value="Milan">Milan</option>
<option value="Monza">Monza</option>
<option value="Napoli">Napoli</option>
<option value="Roma">Roma</option>
<option value="Salernitana">Salernitana</option>
<option value="Sassuolo">Sassuolo</option>
<option value="Torino">Torino</option>
<option value="Udinese">Udinese</option>
<option value="Verona">Verona</option>
<!-- Aggiungi qui le altre squadre di Serie A -->
</select>
<label for="squadraOspiteSerieA">Squadra ospite:</label>
<select id="squadraOspiteSerieA">
<option value="Atalanta">Atalanta</option>
<option value="Bologna">Bologna</option>
<option value="Cagliari">Cagliari</option>
<option value="Empoli">Empoli</option>
<option value="Fiorentina">Fiorentina</option>
<option value="Frosinone">Frosinone</option>
<option value="Genoa">Genoa</option>
<option value="Inter">Inter</option>
<option value="Juventus">Juventus</option>
<option value="Lazio">Lazio</option>
<option value="Lecce">Lecce</option>
<option value="Milan">Milan</option>
<option value="Monza">Monza</option>
<option value="Napoli">Napoli</option>
<option value="Roma">Roma</option>
<option value="Salernitana">Salernitana</option>
<option value="Sassuolo">Sassuolo</option>
<option value="Torino">Torino</option>
<option value="Udinese">Udinese</option>
<option value="Verona">Verona</option>
<!-- Aggiungi qui le altre squadre di Serie A -->
</select>
<h2>Serie B</h2>
<label for="serieB">Squadra di casa:</label>
<select id="serieB">
<option value="Ascoli">Ascoli</option>
<option value="Bari">Bari</option>
<option value="Brescia">Brescia</option>
<option value="Catanzaro">Catanzaro</option>
<option value="Cittadella">Cittadella</option>
<option value="Como">Como</option>
<option value="Cosenza">Cosenza</option>
<option value="Cremonese">Cremonese</option>
<option value="Feralpisalò">Feralpisalò</option>
<option value="Lecco">Lecco</option>
<option value="Modena">Modena</option>
<option value="Palermo">Palermo</option>
<option value="Parma">Parma</option>
<option value="Pisa">Pisa</option>
<option value="Reggiana">Reggiana</option>
<option value="Sampdoria">Sampdoria</option>
<option value="Spezia">Spezia</option>
<option value="Sud Tirol">Sud Tirol</option>
<option value="Ternana">Ternana</option>
<option value="Venezia">Venezia</option>
<!-- Aggiungi qui le altre squadre di Serie B -->
</select>
<label for="squadraOspiteSerieB">Squadra ospite:</label>
<select id="squadraOspiteSerieB">
<option value="Ascoli">Ascoli</option>
<option value="Bari">Bari</option>
<option value="Brescia">Brescia</option>
<option value="Catanzaro">Catanzaro</option>
<option value="Cittadella">Cittadella</option>
<option value="Como">Como</option>
<option value="Cosenza">Cosenza</option>
<option value="Cremonese">Cremonese</option>
<option value="Feralpisalò">Feralpisalò</option>
<option value="Lecco">Lecco</option>
<option value="Modena">Modena</option>
<option value="Palermo">Palermo</option>
<option value="Parma">Parma</option>
<option value="Pisa">Pisa</option>
<option value="Reggiana">Reggiana</option>
<option value="Sampdoria">Sampdoria</option>
<option value="Spezia">Spezia</option>
<option value="Sud Tirol">Sud Tirol</option>
<option value="Ternana">Ternana</option>
<option value="Venezia">Venezia</option>
<!-- Aggiungi qui le altre squadre di Serie B -->
</select>
<h2>Bundesliga</h2>
<label for="bundesliga">Squadra di casa:</label>
<select id="bundesliga">
<option value="Borussia Dortmund">Borussia Dortmund</option>
<option value="Rb Lipsia">Rb Lipsia</option>
<option value="Union Berlino">Union Berlino</option>
<option value="Bayern Monaco">Bayern Monaco</option>
<option value="Bayer Leverkusen">Bayer Leverkusen</option>
<option value="Eintracht Francoforte">Eintracht Francoforte</option>
<option value="Friburgo">Friburgo</option>
<option value="Wolsfburg">Wolsfburg</option>
<option value="Mainz">Mainz</option>
<option value="B.Monchengladbach">B.Monchengladbach</option>
<option value="Colonia">Colonia</option>
<option value="Hoffenheim">Hoffenheim</option>
<option value="Werder Brema">Werder Brema</option>
<option value="Vfl Bochum">Vfl Bochum</option>
<option value="Augusta">Augusta</option>
<option value="Stoccarda">Stoccarda</option>
<option value="Darmstadt">Darmstadt</option>
<option value="Heidenheim">Heidenheim</option>
<!-- Aggiungi qui le altre squadre della Bundesliga -->
</select>
<label for="squadraOspiteBundesliga">Squadra ospite:</label>
<select id="squadraOspiteBundesliga">
<option value="Borussia Dortmund">Borussia Dortmund</option>
<option value="Rb Lipsia">Rb Lipsia</option>
<option value="Union Berlino">Union Berlino</option>
<option value="Bayern Monaco">Bayern Monaco</option>
<option value="Bayer Leverkusen">Bayer Leverkusen</option>
<option value="Eintracht Francoforte">Eintracht Francoforte</option>
<option value="Friburgo">Friburgo</option>
<option value="Wolsfburg">Wolsfburg</option>
<option value="Mainz">Mainz</option>
<option value="B.Monchengladbach">B.Monchengladbach</option>
<option value="Colonia">Colonia</option>
<option value="Hoffenheim">Hoffenheim</option>
<option value="Werder Brema">Werder Brema</option>
<option value="Vfl Bochum">Vfl Bochum</option>
<option value="Augusta">Augusta</option>
<option value="Stoccarda">Stoccarda</option>
<option value="Darmstadt">Darmstadt</option>
<option value="Heidenheim">Heidenheim</option>
<!-- Aggiungi qui le altre squadre della Bundesliga -->
</select>
<h2>Premier League</h2>
<label for="premierLeague">Squadra di casa:</label>
<select id="premierLeague">
<option value="Arsenal">Arsenal</option>
<option value="Aston Villa">Aston Villa</option>
<option value="Bournemouth">Bournemouth</option>
<option value="Brentford">Brentford</option>
<option value="Brighton">Brighton</option>
<option value="Burnley">Burnley</option>
<option value="Chelsea">Chelsea</option>
<option value="Crystal Palace">Crystal Palace</option>
<option value="Everton">Everton</option>
<option value="Fulham">Fulham</option>
<option value="Liverpool">Liverpool</option>
<option value="Luton Town">Luton Town</option>
<option value="Manchester City">Manchester City</option>
<option value="Manchester United">Manchester United</option>
<option value="Newcastle">Newcastle</option>
<option value="Nottingham">Nottingham</option>
<option value="Sheffield United">Sheffield United</option>
<option value="Tottenham">Tottenham</option>
<option value="West Ham">West Ham</option>
<option value="Wolverhampton">Wolverhampton</option>
<!-- Aggiungi qui le altre squadre della Premier League -->
</select>
<label for="squadraOspitePremierLeague">Squadra ospite:</label>
<select id="squadraOspitePremierLeague">
<option value="Arsenal">Arsenal</option>
<option value="Aston Villa">Aston Villa</option>
<option value="Bournemouth">Bournemouth</option>
<option value="Brentford">Brentford</option>
<option value="Brighton">Brighton</option>
<option value="Burnley">Burnley</option>
<option value="Chelsea">Chelsea</option>
<option value="Crystal Palace">Crystal Palace</option>
<option value="Everton">Everton</option>
<option value="Fulham">Fulham</option>
<option value="Liverpool">Liverpool</option>
<option value="Luton Town">Luton Town</option>
<option value="Manchester City">Manchester City</option>
<option value="Manchester United">Manchester United</option>
<option value="Newcastle">Newcastle</option>
<option value="Nottingham">Nottingham</option>
<option value="Sheffield United">Sheffield United</option>
<option value="Tottenham">Tottenham</option>
<option value="West Ham">West Ham</option>
<option value="Wolverhampton">Wolverhampton</option>
<!-- Aggiungi qui le altre squadre della Premier League -->
</select>
<button id="elaboraButton" onclick="elaboraPronostico()">Elabora Pronostico</button>
<button onclick="clearPronostico()">Cancella</button>
<h2>Multipla Strategica con 2 doppie - Possibilità di Plurivincite</h2>
<ul id="partiteList"></ul>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-42590272679126343942023-06-22T12:31:00.019-07:002023-06-22T13:09:54.321-07:00calcolatore<!DOCTYPE html>
<html>
<head>
<title>Calcolatore di Scommesse</title>
<style>
.chance {
margin-bottom: 10px;
}
</style>
</head>
<body>
<h1>Calcolatore 1 + 3 R.E.</h1>
<div class="chance">
<h2>Chance 1 - Risultato Esatto 0-0</h2>
<label for="chance1Quota">Quota:</label>
<input type="number" id="chance1Quota" step="0.01">
<div id="chance1Importo"></div>
</div>
<div class="chance">
<h2>Chance 2 - Risultato Esatto 1-1</h2>
<label for="chance2Quota">Quota:</label>
<input type="number" id="chance2Quota" step="0.01">
<div id="chance2Importo"></div>
</div>
<div class="chance">
<h2>Chance 3 - Risultato Esatto 1-2</h2>
<label for="chance3Quota">Quota:</label>
<input type="number" id="chance3Quota" step="0.01">
<div id="chance3Importo"></div>
</div>
<div class="chance">
<h2>Chance 4 - Segno 1</h2>
<label for="chance4Quota">Quota:</label>
<input type="number" id="chance4Quota" step="0.01">
<div id="chance4Importo"></div>
</div>
<h2>Importo Totale da Giocare</h2>
<input type="number" id="importoTotale" step="0.01">
<button onclick="calcolaImporti()">Calcola Importi</button>
<button onclick="resettaDati()">Cancella</button>
<h2>Guadagno</h2>
<div id="guadagno"></div>
<script>
function calcolaImporti() {
var chance1Quota = parseFloat(document.getElementById("chance1Quota").value);
var chance2Quota = parseFloat(document.getElementById("chance2Quota").value);
var chance3Quota = parseFloat(document.getElementById("chance3Quota").value);
var chance4Quota = parseFloat(document.getElementById("chance4Quota").value);
var importoTotale = parseFloat(document.getElementById("importoTotale").value);
var importo1 = 0;
var importo2 = 0;
var importo3 = 0;
var importo4 = 0;
if (!isNaN(chance1Quota) && !isNaN(chance2Quota) && !isNaN(chance3Quota) && !isNaN(chance4Quota) && !isNaN(importoTotale)) {
if (chance1Quota > 0 && chance2Quota > 0 && chance3Quota > 0 && chance4Quota > 0 && importoTotale > 0) {
var returnTotale = importoTotale;
importo1 = returnTotale / chance1Quota;
importo2 = returnTotale / chance2Quota;
importo3 = returnTotale / chance3Quota;
importo4 = importoTotale - (importo1 + importo2 + importo3);
}
}
document.getElementById("chance1Importo").textContent = "Importo: " + importo1.toFixed(2);
document.getElementById("chance2Importo").textContent = "Importo: " + importo2.toFixed(2);
document.getElementById("chance3Importo").textContent = "Importo: " + importo3.toFixed(2);
document.getElementById("chance4Importo").textContent = "Importo: " + importo4.toFixed(2);
var guadagno = importo4 * chance4Quota - importoTotale;
document.getElementById("guadagno").textContent = "Vincita netta se esce il segno 1: " + guadagno.toFixed(2);
}
function resettaDati() {
document.getElementById("chance1Quota").value = "";
document.getElementById("chance2Quota").value = "";
document.getElementById("chance3Quota").value = "";
document.getElementById("chance4Quota").value = "";
document.getElementById("importoTotale").value = "";
document.getElementById("chance1Importo").textContent = "";
document.getElementById("chance2Importo").textContent = "";
document.getElementById("chance3Importo").textContent = "";
document.getElementById("chance4Importo").textContent = "";
document.getElementById("guadagno").textContent = "";
}
</script>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-59412193041047607882023-06-20T13:28:00.064-07:002023-06-22T11:45:39.134-07:00simula game<!DOCTYPE html>
<html>
<head>
<title>Simulatore Partita di Calcio</title>
<style>
.actions {
margin-bottom: 10px;
}
.team-form {
display: inline-block;
vertical-align: top;
margin-right: 20px;
}
</style>
</head>
<body>
<h1>Simulatore Partita di Calcio</h1>
<div class="team-form">
<form id="homeTeamForm">
<h2>Squadra di Casa</h2>
<label for="homeTeamName">Nome Squadra:</label>
<input type="text" id="homeTeamName" required>
<h3>Titolari</h3>
<textarea id="homePlayers" rows="11" cols="25" placeholder="Inserisci i nomi dei calciatori, uno per riga" required></textarea>
<h3>Riserve</h3>
<textarea id="homeReserves" rows="9" cols="25" placeholder="Inserisci i nomi dei calciatori, uno per riga" required></textarea>
</form>
</div>
<div class="team-form">
<form id="awayTeamForm">
<h2>Squadra Avversaria</h2>
<label for="awayTeamName">Nome Squadra:</label>
<input type="text" id="awayTeamName" required>
<h3>Titolari</h3>
<textarea id="awayPlayers" rows="11" cols="25" placeholder="Inserisci i nomi dei calciatori, uno per riga" required></textarea>
<h3>Riserve</h3>
<textarea id="awayReserves" rows="9" cols="25" placeholder="Inserisci i nomi dei calciatori, uno per riga" required></textarea>
</form>
</div>
<div class="actions" id="actionsContainer"></div>
<h2>Risultato</h2>
<div id="result"></div>
<button onclick="simulate()">Simula</button>
<script>
var actionsContainer = document.getElementById("actionsContainer");
var resultContainer = document.getElementById("result");
function getPlayers(teamFormId) {
var players = [];
var playerInputs = document.querySelectorAll("#" + teamFormId + " textarea");
playerInputs.forEach(function (input) {
var names = input.value.split("\n");
names.forEach(function (name) {
if (name.trim() !== "") {
players.push(name.trim());
}
});
});
return players;
}
function getRandomPlayer(players, excludedPlayers) {
var availablePlayers = players.filter(function(player) {
return excludedPlayers.indexOf(player) === -1;
});
if (availablePlayers.length === 0) {
return null;
}
var randomIndex = Math.floor(Math.random() * availablePlayers.length);
return availablePlayers[randomIndex];
}
function generateRandomMinute(usedMinutes) {
var minute = Math.floor(Math.random() * 90) + 1;
if (usedMinutes.includes(minute)) {
return generateRandomMinute(usedMinutes);
}
return minute;
}
function simulate() {
actionsContainer.innerHTML = "";
resultContainer.innerHTML = "";
var homeTeamName = document.getElementById("homeTeamName").value;
var homePlayers = getPlayers("homeTeamForm");
var awayTeamName = document.getElementById("awayTeamName").value;
var awayPlayers = getPlayers("awayTeamForm");
var usedMinutes = [];
var excludedHomePlayers = [];
var excludedAwayPlayers = [];
var actions = [];
// Generate actions for home team
for (var i = 0; i < 16; i++) {
var player = getRandomPlayer(homePlayers, excludedHomePlayers);
if (player === null) {
break;
}
for (var j = 0; j < 5; j++) {
var minute = generateRandomMinute(usedMinutes);
usedMinutes.push(minute);
actions.push({ team: homeTeamName, minute: minute, action: player + " azione" });
}
excludedHomePlayers.push(player);
}
// Generate actions for away team
for (var i = 0; i < 16; i++) {
var player = getRandomPlayer(awayPlayers, excludedAwayPlayers);
if (player === null) {
break;
}
for (var j = 0; j < 5; j++) {
var minute = generateRandomMinute(usedMinutes);
usedMinutes.push(minute);
actions.push({ team: awayTeamName, minute: minute, action: player + " azione" });
}
excludedAwayPlayers.push(player);
}
actions.sort(function (a, b) {
return a.minute - b.minute;
});
var delay = 0;
for (var i = 0; i < actions.length; i++) {
setTimeout(function (action) {
actionsContainer.innerHTML += "<p>Minuto: " + action.minute + " - " + action.team + ": " + action.action + "</p>";
}, delay, actions[i]);
delay += 2000;
}
setTimeout(function () {
resultContainer.innerHTML = "<p>Il risultato finale è 1-0 per " + homeTeamName + " contro " + awayTeamName + ".</p>";
}, delay);
}
</script>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-88063566162851466772023-06-19T03:30:00.006-07:002023-06-19T04:04:22.731-07:00profitto mensile<!DOCTYPE html>
<html>
<head>
<title>Calcolatore di Profitto Mensile</title>
<style>
table {
border-collapse: collapse;
width: 100%;
}
th, td {
border: 1px solid black;
padding: 8px;
text-align: center;
}
.blue-button {
background-color: #2196F3;
color: white;
}
.red-button {
background-color: #FF0000;
color: white;
}
.yellow-row {
background-color: yellow;
}
.lightgreen-row {
background-color: lightgreen;
}
#importoFinale, #guadagnoNetto {
font-weight: bold;
font-size: larger;
}
</style>
<script>
function calcolaProfitto() {
var importoIniziale = parseFloat(document.getElementById("importoIniziale").value);
var percentualeIncremento = parseFloat(document.getElementById("percentualeIncremento").value);
var guadagnoTotale = 0;
var sumProfitti = 0;
var table = document.getElementById("risultatiTable");
table.innerHTML = ""; // Resetta la tabella ad ogni calcolo
var headerRow = table.insertRow();
var headerCell1 = headerRow.insertCell(0);
var headerCell2 = headerRow.insertCell(1);
var headerCell3 = headerRow.insertCell(2);
var headerCell4 = headerRow.insertCell(3);
headerCell1.innerHTML = "Giorno";
headerCell2.innerHTML = "Saldo Iniziale";
headerCell3.innerHTML = "Profitto Giornaliero";
headerCell4.innerHTML = "Saldo di Chiusura";
var row = table.insertRow();
var cell1 = row.insertCell(0);
var cell2 = row.insertCell(1);
var cell3 = row.insertCell(2);
var cell4 = row.insertCell(3);
cell1.innerHTML = "1";
cell2.innerHTML = importoIniziale.toFixed(2) + " €";
cell3.innerHTML = (importoIniziale * percentualeIncremento / 100).toFixed(2) + " €";
cell4.innerHTML = (importoIniziale + (importoIniziale * percentualeIncremento / 100)).toFixed(2) + " €";
guadagnoTotale = importoIniziale * percentualeIncremento / 100;
sumProfitti = guadagnoTotale;
if (sumProfitti >= importoIniziale) {
row.classList.add("yellow-row");
}
if (sumProfitti >= (importoIniziale * 3)) {
row.classList.add("lightgreen-row");
}
for (var i = 2; i <= 30; i++) {
importoIniziale += guadagnoTotale;
guadagnoTotale = importoIniziale * percentualeIncremento / 100;
sumProfitti += guadagnoTotale;
var row = table.insertRow();
var cell1 = row.insertCell(0);
var cell2 = row.insertCell(1);
var cell3 = row.insertCell(2);
var cell4 = row.insertCell(3);
cell1.innerHTML = i;
cell2.innerHTML = importoIniziale.toFixed(2) + " €";
cell3.innerHTML = guadagnoTotale.toFixed(2) + " €";
cell4.innerHTML = (importoIniziale + guadagnoTotale).toFixed(2) + " €";
if (sumProfitti >= importoIniziale) {
row.classList.add("yellow-row");
}
if (sumProfitti >= (importoIniziale * 3)) {
row.classList.add("lightgreen-row");
}
}
var importoFinale = (importoIniziale + sumProfitti).toFixed(2);
var guadagnoNetto = sumProfitti.toFixed(2);
document.getElementById("importoFinale").innerHTML = importoFinale + " €";
document.getElementById("guadagnoNetto").innerHTML = guadagnoNetto + " €";
}
function resettaCalcolatore() {
document.getElementById("importoIniziale").value = "";
document.getElementById("percentualeIncremento").value = "";
document.getElementById("risultatiTable").innerHTML = "";
document.getElementById("importoFinale").innerHTML = "";
document.getElementById("guadagnoNetto").innerHTML = "";
}
</script>
</head>
<body>
<h1>Calcolatore di Profitto Mensile</h1>
<label for="importoIniziale">Importo da investire:</label>
<input type="number" id="importoIniziale" step="0.01" required><br><br>
<label for="percentualeIncremento">Percentuale di incremento giornaliero:</label>
<input type="number" id="percentualeIncremento" step="0.01" required><br><br>
<button onclick="calcolaProfitto()" class="blue-button">Calcola Profitto</button>
<button onclick="resettaCalcolatore()" class="red-button">Resetta</button><br><br>
<table id="risultatiTable">
<!-- Intestazione della tabella -->
<tr>
<th>Giorno</th>
<th>Saldo Iniziale</th>
<th>Profitto Giornaliero</th>
<th>Saldo di Chiusura</th>
</tr>
</table><br><br>
<label><b>Importo finale:</b></label>
<span id="importoFinale"></span><br><br>
<label><b>Guadagno netto:</b></label>
<span id="guadagnoNetto"></span><br><br>
</body>
</html>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3061022541508044624.post-27512615455216124402023-06-15T12:47:00.003-07:002023-06-15T12:47:54.695-07:00simula 2<!DOCTYPE html>
<html>
<head>
<title>Simulatore Partita</title>
<style>
.container {
display: flex;
justify-content: center;
align-items: center;
margin-top: 50px;
}
.formazione {
margin: 0 20px;
}
button {
display: block;
margin: 20px auto;
}
</style>
</head>
<body>
<h2>Simulatore Partita</h2>
<div class="container">
<div class="formazione">
<h3>Squadra di casa (Salernitana)</h3>
<select id="squadra-casa">
<option value="SEPE">SEPE</option>
<option value="FIORILLO">FIORILLO</option>
<option value="BRONN">BRONN</option>
<option value="BRADARIC">BRADARIC</option>
<option value="FAZIO">FAZIO</option>
<option value="GYOMBER">GYOMBER</option>
<option value="DANILIUC">DANILIUC</option>
<option value="MAGGIORE">MAGGIORE</option>
<option value="CRNIGOJ">CRNIGOJ</option>
<option value="COULIBALY">COULIBALY</option>
<option value="VILHENA">VILHENA</option>
<option value="MAZZOCCHI">MAZZOCCHI</option>
<option value="KASTANOS">KASTANOS</option>
<option value="BOHINEN">BOHINEN</option>
<option value="CANDREVA">CANDREVA</option>
<option value="BONAZZOLI">BONAZZOLI</option>
<option value="BOTHEIM">BOTHEIM</option>
<option value="PIATEK">PIATEK</option>
<option value="DIA">DIA</option>
<option value="VALENCIA">VALENCIA</option>
</select>
</div>
<div class="formazione">
<h3>Squadra ospite (Udinese)</h3>
<select id="squadra-ospite">
<option value="SILVESTRI">SILVESTRI</option>
<option value="PADELLI">PADELLI</option>
<option value="EBOSSE">EBOSSE</option>
<option value="PEREZ">PEREZ</option>
<option value="BIJOL">BIJOL</option>
<option value="MASINA">MASINA</option>
<option value="BECAO">BECAO</option>
<option value="PAFUNDI">PAFUNDI</option>
<option value="ARSLAN">ARSLAN</option>
<option value="UDOGIE">UDOGIE</option>
<option value="EHIZIBHUE">EHIZIBHUE</option>
<option value="PEREYRA">PEREYRA</option>
<option value="WALACE">WALACE</option>
<option value="SAMARDZIC">SAMARDZIC</option>
<option value="LOVRIC">LOVRIC</option>
<option value="THAUVIN">THAUVIN</option>
<option value="BETO">BETO</option>
<option value="SUCCESS">SUCCESS</option>
<option value="NESTOROVSKI">NESTOROVSKI</option>
<option value="DEULOFEU">DEULOFEU</option>
</select>
</div>
</div>
<button onclick="simulaPartita()">Simula partita</button>
<div id="risultato-partita"></div>
<script>
function simulaPartita() {
var squadraCasa = document.getElementById("squadra-casa").value;
var squadraOspite = document.getElementById("squadra-ospite").value;
var azioniPartita = [];
var azioni = ["goal", "assist", "cartellino giallo", "cartellino rosso", "skipping", "cross", "tiro in porta", "parata", "calcio d'angolo", "rigore", "calcio di punizione", "riposizionamento", "fallimento", "passaggio", "difesa", "recupero palla", "fuorigioco", "palla inattiva", "tiro respinto", "contrattacco"];
for (var i = 0; i < 20; i++) {
var randomAzione = azioni[Math.floor(Math.random() * azioni.length)];
var randomGiocatore = "";
if (i % 2 === 0) {
randomGiocatore = squadraCasa;
} else {
randomGiocatore = squadraOspite;
}
var azionePartita = randomGiocatore + " - " + randomAzione;
azioniPartita.push(azionePartita);
}
var risultatoPartita = "<h3>Risultato partita:</h3>";
for (var j = 0; j < azioniPartita.length; j++) {
risultatoPartita += "<p>" + azioniPartita[j] + "</p>";
}
document.getElementById("risultato-partita").innerHTML = risultatoPartita;
}
</script>
</body>
</html>
Unknownnoreply@blogger.com0