Skip to content

Instantly share code, notes, and snippets.

@bricef
Created December 16, 2021 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bricef/3815a7f528dc1c347446421bcd601f14 to your computer and use it in GitHub Desktop.
Save bricef/3815a7f528dc1c347446421bcd601f14 to your computer and use it in GitHub Desktop.
Universal Paperclip quantum computing helper

Instructions

When playing the game Universal Paperclips copy and paste this code in your browser to automatically trigger the quantum computer button when it would yield a compute benefit.

let btn = document.getElementById('btnQcompute')
let chips = Array.from(document.getElementsByClassName('qChip'))
let interval = setInterval(()=>{
let t = chips.map(c => c.style.opacity).map(parseFloat).reduce( (x,y) => x+y );
if (t > 0){
btn.click()
}
}, 10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment