Signed-off-by: Weetile <weetile@noreply.localhost>
This commit is contained in:
parent
3f4848bcbe
commit
10165ca541
43
index.html
43
index.html
@ -377,8 +377,8 @@
|
|||||||
<div class="timer-section">
|
<div class="timer-section">
|
||||||
<h2 class="section-title">BLINDS TIMER</h2>
|
<h2 class="section-title">BLINDS TIMER</h2>
|
||||||
<div class="blind-levels">
|
<div class="blind-levels">
|
||||||
<div class="current-level" id="current-blinds">10 / 20</div>
|
<div class="current-level" id="current-blinds">5 / 10</div>
|
||||||
<div class="next-level">Next: <span id="next-blinds">20 / 40</span></div>
|
<div class="next-level">Next: <span id="next-blinds">10 / 20</span></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="timer-display" id="timer">30:00</div>
|
<div class="timer-display" id="timer">30:00</div>
|
||||||
<div class="timer-controls">
|
<div class="timer-controls">
|
||||||
@ -414,16 +414,35 @@
|
|||||||
let isTimerRunning = false;
|
let isTimerRunning = false;
|
||||||
|
|
||||||
// Blind levels
|
// Blind levels
|
||||||
let currentBlinds = { small: 10, big: 20 };
|
let currentBlinds = { small: 5, big: 10 };
|
||||||
let blindLevels = [];
|
let blindLevels = [];
|
||||||
|
|
||||||
// Generate blind levels
|
// Generate blind levels with the specified structure
|
||||||
function generateBlindLevels() {
|
function generateBlindLevels() {
|
||||||
blindLevels = [];
|
// Initial specific blind levels as requested
|
||||||
let small = 10;
|
blindLevels = [
|
||||||
let big = 20;
|
{ small: 5, big: 10 },
|
||||||
|
{ small: 10, big: 20 },
|
||||||
|
{ small: 20, big: 40 },
|
||||||
|
{ small: 30, big: 60 },
|
||||||
|
{ small: 40, big: 80 },
|
||||||
|
{ small: 50, big: 100 },
|
||||||
|
{ small: 75, big: 150 },
|
||||||
|
{ small: 100, big: 200 },
|
||||||
|
{ small: 150, big: 300 },
|
||||||
|
{ small: 200, big: 400 },
|
||||||
|
{ small: 300, big: 600 },
|
||||||
|
{ small: 400, big: 800 },
|
||||||
|
{ small: 500, big: 1000 }
|
||||||
|
];
|
||||||
|
|
||||||
for (let i = 0; i < 20; i++) {
|
// Continue doubling from the last level
|
||||||
|
let lastLevel = blindLevels[blindLevels.length - 1];
|
||||||
|
let small = lastLevel.small * 2;
|
||||||
|
let big = lastLevel.big * 2;
|
||||||
|
|
||||||
|
// Add 7 more doubled levels
|
||||||
|
for (let i = 0; i < 7; i++) {
|
||||||
blindLevels.push({ small, big });
|
blindLevels.push({ small, big });
|
||||||
small *= 2;
|
small *= 2;
|
||||||
big *= 2;
|
big *= 2;
|
||||||
@ -475,9 +494,11 @@
|
|||||||
timeRemaining--;
|
timeRemaining--;
|
||||||
updateTimerDisplay();
|
updateTimerDisplay();
|
||||||
} else {
|
} else {
|
||||||
// Time's up, move to next blind level
|
// Time's up, move to next blind level and restart the timer
|
||||||
incrementBlinds();
|
incrementBlinds();
|
||||||
resetTimer();
|
timeRemaining = timerDuration; // Reset time remaining to duration
|
||||||
|
updateTimerDisplay(); // Update display with new time
|
||||||
|
// Timer continues running without stopping
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
@ -623,4 +644,4 @@
|
|||||||
window.addEventListener('DOMContentLoaded', init);
|
window.addEventListener('DOMContentLoaded', init);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
x
Reference in New Issue
Block a user