puginarug icon indicating copy to clipboard operation
puginarug copied to clipboard

Added negative levels

Open IAmJamesHall opened this issue 2 years ago • 1 comments

Hey Tim! Sorry I went radio dark for so long. I took your suggestion in my last PR and implemented it. I basically just added a event listener on window blur that would start counting down, and eventually go into the negative levels.

Like you suggested, I used my old code for the negative levels, so that it wouldn't be possible to skip a level by not having the window focused. At first I kept the old (intentionally buggy) code for the positive levels, but then I observed that if you got a high rank while active, then the window blurred, when you came back you would still have your high rank, even with a much lower seconds counter. And that didn't seem very honoring to pug 😉. So, I implemented the new code for the positive levels as well.

Let me know if you see any problems, or if there are bugs I missed. This was a lot of fun to work on :)

-James

IAmJamesHall avatar Jun 13 '23 05:06 IAmJamesHall

Woah, awesome!! Will check this out on the weekend! Looks great at first glance 👯

tholman avatar Jun 14 '23 02:06 tholman