Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Nice variation, funny to solve.
This isn't good practice because you're mutating the field. There is no reason for mutation to take place, and you shouldn't need to duplicate the data either. Remember the field parameter for validate_battlefield(field) is a reference, so you've just mutated the original 2D array.
Nice Kata! Something different than usual!!
Wouldn't that be over-counting the cell's neighbors? The top left cell would be the bottom of the cell that is already being counted as the cell to the left... it's the same cell just a different side of it. And wouldn't the due north cell and the due south cell be counting itself as live neighbors?
In this case the cells top and bottom neighboors are them selves. So the second cell in your example would have the following neighboors:
I'm a little confused on the single row/single column universes and how each cell's neighbor his counted. The way I visualize it is that if the universe is "0 1 0 1 0 1 0 1 1" for example... each column would fold on its self (so the bottom of the a cell would be touching it's own top) and only the first and last cells' sides would be touching. So it would almost be like a flat donut shape. So in this case.... wouldn't all cells die per the rules? Each dead cell only has 2 live neighbors (3 required) and each live cell (except for the last cell) has no live neighbors which means they die off.
Approved
factor translation
That's what happens with this input: each two generations, the cells come back to their original state.
I don't get this :( It looks like the tests expect me to return the same generation on blink back. I did not mutate the input.
COBOL translation (author is inactive).
Approved :)
right, my mistake
Are you sure? What about
Pentadecathlon (random generations)
testcases (I didn't solve this kata).raised as an issue
Loading more items...