Do some improvements
This commit is contained in:
		
							
								
								
									
										11
									
								
								index.html
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								index.html
									
									
									
									
									
								
							| @ -200,8 +200,8 @@ | ||||
|             <div class="instructions"> | ||||
|                 <h3>How to Play:</h3> | ||||
|                 <p>Think of a number between <strong>1 and 100</strong>.</p> | ||||
|                 <p>I'll show you 7 groups of numbers. For each group, tell me if your number is included.</p> | ||||
|                 <p>After all 7 groups, I'll magically tell you your number! 🎩✨</p> | ||||
|                 <p>I'll show you 6 groups of numbers. For each group, tell me if your number is included.</p> | ||||
|                 <p>After all groups, I'll be able to tell you your number! 🎩✨</p> | ||||
|             </div> | ||||
|             <div style="margin: 20px 0;"> | ||||
|                 <label style="display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 1.1em; color: #555;"> | ||||
| @ -228,6 +228,7 @@ | ||||
|             </div> | ||||
|         </div> | ||||
|  | ||||
|  | ||||
|     </div> | ||||
|  | ||||
|     <script> | ||||
| @ -236,7 +237,7 @@ | ||||
|  | ||||
|         function generateNumberGroups(maxNumber = 100, shouldRandomize = false) { | ||||
|             const generatedGroups = []; | ||||
|             let bitPosition = 0; | ||||
|             let bitPosition = 1; // Start from bit position 1 to skip the first group (odd numbers) | ||||
|              | ||||
|             while ((1 << bitPosition) <= maxNumber) { | ||||
|                 const group = []; | ||||
| @ -281,7 +282,6 @@ | ||||
|             const shouldRandomize = document.getElementById('randomizeToggle').checked; | ||||
|             groups = generateNumberGroups(100, shouldRandomize); | ||||
|             currentGroup = 0; | ||||
|             result = 0; | ||||
|              | ||||
|             document.getElementById('welcome').classList.remove('active'); | ||||
|             document.getElementById('game').classList.add('active'); | ||||
| @ -295,8 +295,7 @@ | ||||
|             const progressBar = document.getElementById('progressBar'); | ||||
|              | ||||
|             groupTitle.textContent = ""; | ||||
|              | ||||
|             const progress = ((currentGroup) / groups.length) * 100; | ||||
|             const progress = ((currentGroup + 1) / groups.length) * 100; | ||||
|             progressBar.style.width = progress + '%'; | ||||
|              | ||||
|             numbersGrid.innerHTML = ''; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user