After the success of my baccarat challenge, I figured we should try a similar challenge for another casino game, blackjack.
Blackjack is a game played with two to eight decks of cards shuffled together. The object is to reach a hand that totals as close to 21 as possible, without going over. Numb...
@DLosc, I have been experimenting with storing multiple unbounded numbers as 2**a + 3**b + 5**c + ... (simple divmod with this strategy); Have you ever used this approach in any of your code-golf solutions?
Also notice that the exponent bases don't need to primes; just that they need to be co-prime to each other. So when storing a finite number of unbounded integers you can use a program to search for pairwise co-prime arithmetic progression (this is the strategy I used for the BF with unbounded cells -> Acc!! transpiler)
*the addition on the first line should be multiplication
@Mukundan314 I haven't; in fact, I've generally stayed away from challenges that require storing more than one unbounded number. In the original challenge that gave rise to Acc!!, I stored four unbounded numbers in binary by interleaving their bits--it worked for that task, but it's a bit inconvenient as a general approach.
The BF compiler I created might have a shot thanks to PyPy's incredible JIT, but I have my doubts. Also, limiting nested loops in asm2bf could be challenging (though I have no idea about this part since I have never used asm2bf)
So I can do some background thinking, is there going to be an instruction pointer? Or is it grab when possible? And is it possible for numbers moving to "lose momentum" and get stuck?
@lyxal i'm not sure what you mean by "grab when possible"
numbers' movement is only decided by the primitives which appear in each grid cell, whether they "lose momentum" or not is dependent on what the primitive is
there is a primitive W that does pretty much make a number lose momentum: it stops until another value is received (for synchronization)
i don't think numbers can collide because they are always on opposite sides of primitives, if i understand what you mean, so if they manage to collide it's a bug
thanks! some of those I already have, some I'm not sure they fit the language (those that move signals elsewhere instead of just processing them) but a few are quite useful
especially conditionals! I completely forgot about them
A fictional "sequential" game of Rock Paper Scissors
A number of people stand in a line with their hands hidden in a pre-chosen state of either Rock ✊, Paper ✋ or Scissors ✌️. Here's an example line:
Initial Line
✌️ ✋ ✊ ✋ ✊ ✌️ ✌️ ✊ ✌️ ✋ ✊
The game goes like this: at each turn, the leftm...
JSL - JMP Scripting Language, 15 bytes
In this challenge the most difficult part was to check whether JSL had no submissions yet (977 answers on 33 pages) =))
"Hello world!"
Outputs "Hello, World!" to the console.
Divisibility patterns
I was writing a helper script to visualize problem spots for my code with this question and the output was prettier and more patterny than I expected. Your task in this code-golf challenge is to create a similar generalized output in as few bytes as possible.
Your inputs are...
If I had a nickel for every time today that I've accidentally typed stack.pip(), I'd have two nickels. Which is not a lot, but... well, honestly, I'm surprised it hasn't happened more.