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.
I literally fixed Python lol, it was in a catastrophic state before. Random test code was in preloaded for reasons unknown to science.
Factor does log the input to the console, but it's not "garbage". Python and JavaScript have a function in preloaded, but that's the pretty-printing one mentionned in the description. All 3 have random tests.
Old good kata)
Resolved in Python.
Not resolving as potentially present in other languages.
approved by someone
Python fork
Python:
Those aren't actual random tests though, you can solve them through pure pattern matching if you really wanted.
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
Loading more items...