Hopefully for CJam the junkware is only being bundled with the most popular mass downloaded files, but I thought it would be worth mentioning here just in case.
(and even smaller projects may see this as an ethical reason to leave)
@Lembik well i'd already used that indexing before, and then Sp3000's solution used KMP so it didn't really take any ingenuity to think of it, then just a matter of checking whether it works out
i mean, ingenuity for me to think of it, given that i'd read Sp3000's answer
Could cloning depend on some analogue of "food", so it can't be done indefinitely? Maybe cloning requires gaining something that either takes a lot of time, or requires killing other demons, or some combination of the two
are there nontrivial python programs that remain valid under the deletion of one single char from the code? let's say nontrivial means producing output
I was thinking that maybe you need to spend all your turn's points to make a clone if the clone will have that many points (so you are cloning the demon, not it's points)
So if you have 8 new points per turn, you can use them to give 8 demons one point each, or to clone one demon that currently has 8 points, or to clone 2 demons that currently have 4 points
If you have a demon that has 9 points, then 8 points is not enough to clone it. You would have to save up points or wait until the demon has lost points
If you want it to be the demon's actions, you could say that all of the stats are shared between the demon and its clone
So they have half each
Then turn based points would gradually increase them again
This should mean that it is an advantage to make a small number of clones (to give strategic advantage from position) but making a large number of clones is a disadvantage as they are all weak
if you're using the move CROSS for instance, you get to damage with attack+1 (attack won't drop below 0), so you'll do 1 damage, no matter the defense of the opponent
Sandbox note : Big change in specs, mainly for balancing issues (thanks to @trichoplax for your sugeestions :))
Major changes : Starting, Turn deroulement (2 phases from now), tie-break, Cloning. Merging may be removed due to the new specs (rendered pretty useless).
With the current ...
When writing a meta post the tag icons still link to tags on main, not tags on meta. If you want to create a tag icon that links to a tag on meta, you can by using meta-tag instead of tag. For example discussion
yeah sort of... although it's hard to get exact angles and coordinates... I created that by tweaking the parameters by hand until it looked believable.
That sounds almost as insta-close as "Write a Java program which looks like a heart and outputs a program which looks like a duck, which in turn outputs the original program, without using any file-writing methods and without any of the letters in "HEART" or "DUCK""
Multiples - a wrap battle
king-of-the-hill
Overview
Change cells in multiples to wipe out your opponent, while avoiding being wiped out yourself.
This is a 2 player game, played on a linear string of cells of length L that wrap in a loop. Counting along the loop eventually brings you back...
It seems that extreme approaches are less effective, so that gives me hope that it will be about finding an effective approach in the middle, rather than being an obvious optimal solution. For example, neither using all of the stockpile every move nor saving all of the stockpile every move are optimal, since the more you save the more you can use next turn, but the more you use the more you will gain next turn
For the range, is that the diameter rather than the radius? Otherwise radius 9 would be enough to wipe out a 17 height board
@trichoplax I mean, if you name your demons after their roles (all your healer are called "healer", your surprise mofo bomb is called "explo" etc, it could be spotted)
Most KotH answers include an explanation of the strategy anyway - it isn't usual to hide that
But if you just give them numbers you could assign different numbers each time so an opponent can't just hard code "the enemy demon number 3 is an exploder"
yes that makes sense. So I could make my player generate the same demons every time, but in a random order so that the counter numbers don't come out the same
Write a program or function that duplicates characters in a word, so that all the duplicated letters arranged in order would form the input array.
For example:
input: chameleon, [c,a,l,n]
output: cchaamelleonn
Input
The starting word (e.g. chameleon)
An array of characters ([c,a,l,n]) or a ...
Merging Words
Input
Two strings, and two numbers: hlwl, elo_ord!, 1 2
These may be function parameters, STDIN or language equivalents.
Output
The second string merged into the first string. The numbers specify how many characters to add when merging.
This is what happens:
h l w l ...
Any ideas how I could fix my More is Less? I don't really want to make it a pop contest, but every scoring metric I can think of would probably favor the least interesting solutions...
High Precision Metallic Means
code-golf other tags?
Background
The metallic means, starting with the famous golden mean, are defined for every natural number (positive integer), and each one is an irrational constant (it has an infinite non-recurring decimal expansion).
For a natural number...
Rocket Bots
The year is 3024. People have become too scarce a resource to risk in war, so combat has shifted to the robots. Your task is to construct a bot like no other, who's rockets will rain destruction down on your foes and shoot down all incoming threats.
Gameplay
Bots
Gameplay takes pl...
Inspired by this link I found on Reddit.
A FuzzyFinder is a feature of many text editors. As you start to type a file path S, the FuzzyFinder kicks in and shows you all files in the current directory containing the string you entered, sorted by the position of S in the file.
Your task is to imp...
I found this question on math.se, and I find it quite interesting. For an n-sided die and a number from 1 - k, is there a general method for finding a solution that takes the least number of rolls, on average?
Find the optimal nim move
This is a code-golf challenge.
The game
Nim is a mathematical strategy game, where 2 players take turns taking items from distinct heaps. On your turn, you must take at least one item, and you may take as many as you want, provided that you only take from one heap. T...
@Lembik it feels low priority to me, and not so interesting since it is a straightforward extension of j=1 and j=2, but i'll probably get to it eventually
It looks like a fun language, but the official site is down and the EsoLangs page doesn't explain it quite well and looks like it's missing stuff. Is there anywhere that the language is documented?
1 {7}* runs the block {7} once (just as 7{1}* would run the block {1} seven times). So [1 {7}*] creates the array [7]. Then {+}* just gives the 7, because fold needs at least two elements to apply the block.
I'm inclined to put no restriction as there is always some advantage for some languages whatever I decide. I just wanted to double check there wasn't a strong objection to that first
@Doorknob do you have a preference? It's for the metallic means sandbox question.
One transparent colour
code-golf
Overview
This challenge will only involve a hex string as input and a hex string as output, but will be explained in terms of computer graphics.
Given a fixed size background image and a smaller fixed size sprite, place the sprite on the background image all...