Skip to content

Commit

Permalink
make alternative solution paths more feasable
Browse files Browse the repository at this point in the history
  • Loading branch information
Entkenntnis committed Nov 18, 2024
1 parent c09a9e1 commit 5fabac3
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/content/challenges-part1.js
Original file line number Diff line number Diff line change
Expand Up @@ -803,10 +803,18 @@ export const part1 = [
<script src="/powerglitch.min.js"></script>
<script>
const previous = parseInt(document.getElementById('statusbar-user-score').innerHTML)
const newVal = previous + (Math.random() > 0.5 ? 1 : -1)
document.getElementById('statusbar-user-score').innerHTML = newVal
let diff = (Math.random() > 0.5 ? 1 : -1)
PowerGlitch.glitch('#statusbar-user-score')
function update() {
const newVal = previous + diff
diff *= -1
document.getElementById('statusbar-user-score').innerHTML = newVal
PowerGlitch.glitch('#statusbar-user-score', {playmode: 'manual'}).startGlitch()
setTimeout(update, Math.random()*1000 + 1500)
}
update()
</script>
`
),
Expand Down

0 comments on commit 5fabac3

Please sign in to comment.