That's weird, I managed to earn both the Inquisitive and the Curious badges overnight... I didn't think I was that close to getting a positive question record (cc @DJMcMayhem)
@MitchSchwartz Can you explain why the <+] trick actually works? From staring at the code it would seem that the ] sends the interpreter into a loop until pc doesn't even point into the current stack frame any more and I have no idea how to tell what happens afterward that makes the tape head end up at the end of the program.
var entityMap={"&":"&","<":"<",">":">",'"':'"',"'":''',"/":'/'};function escapeHtml(string){return String(string).replace(/[&<>"'\/]/g,function(s){return entityMap[s]})}
@zyabin101 Red is for ((x^(y/2)) ^ ((x/2)^y)/2) > (x^(y/2), blue is where they're equal, and black is otherwise. A little different just to make it look Darth-Mauly and appease Fatalize. :P
@BetaDecay I'm not entirely sure this is going to be as rich in outputs as the other one, since X and Y don't interact here. you'll just always get an intersection of two sets of orthogonal bars.
>>> new Chance(1309).integer()
-4062971214954496
>>> new Chance(-4062971214954496 - 3).integer()
7569714188386304
>>> new Chance(7569714188386304).bool()
true
First call, I seed Chance with the turn No. and generate a random integer.
> Some jerk on NAO died right on the up stairs with three pet arch-liches and a master mind flayer, and left me a bones file. It had been a fantastically lucky run right up to that point, too. --129.176.151.14 10:08, 16 February 2014 (UTC)
Second call, I take the result of the first call and subtract (for branches that are not DoD or Gehennom, for DoD and Gehennom, add) the dungeon level No. and seed Chance with it and generate a random integer.
Third call, I take the result of the second call and generate a boolean.
fun fact: if you attempt to change the default code page on a "Single Language" version of windows 10, you'll need to reinstall. no recovery options will help you
> ...some players prefer waiting until they're level 7, when Valkyries gain intrinsic speed and can run away from hazards such as water demons more easily.
JPEG recompress iterations
image-processingcode-golf
I was inspired by this question on the Photography SE site. It appears that opening and saving a JPEG file can change the quality of the image. The objective of this codegolf is to count how many iterations it takes the JPEG compression algor...
Hey, I might have missed stuff, as I've played the game, and so everything seems "intuitive" to me. Can somebody who has not played Slay ensure that the spec is clear:
Slay
This KoTH is based off of the computer game, Slay. Try it out, its way fun.
TLDR
You start off with a bunch of small territories: you try to merge them and capture as much land as possible.
Each territory has its own economy: each hex gives you 1 gold per turn.
Warriors can capture an...