5
Conway's Game of Life example
(lemmy.world)
interesting! Hadnt seen sigbla before - nice use.
Just curious,
// Add some logic to detect when we're stuck in a loop
boards.add(conway.map { true in it }.toList().hashCode())
…
if (boards.size < 5) {
// Stuck in loop, add some randomness
What do you mean with stuck in a loop? Is it where the game reaches a state where its cycling continuously through the same variations repeatedly?
Yep, exactly that.
Neat! I love Conway's Game of Life. Something very zen watching it and thinking about it. I was surprised to see Conway say that he's not really a fan of the Game of Life himself.
Kotlin is a statically typed programming language for the JVM, Android, JavaScript, and native.
Subreddit rules:
Resources: