cellular

package
v0.0.0-...-adc953a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

README

Cellular Automata

  • Each grid square is one of 4 different types: Red, Green, Blue, or Empty.
  • The "Neighborhood" of a cell is the 8 surrounding cells.
Color Enemy Fun Description
Red Blue Water puts out a fire.
Blue Green Earth grows out of water.
Green Red Fire burns the earth.

Experiments

        Links to Various Playground Examples!

Example of finding the highest color(s) and value in map. Map is color -> count or map[uint8]uint8, since the colors are enumerated.

Really cool Patterns.

This one is pretty odd. But has an interesting property.

Wave Patterns

Rough Waves

This one is oddly beautiful: https://play.golang.org/p/SofMEv8cpHM

Waves of awesomeness: https://play.golang.org/p/A9YtAkoVkIa

    ▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒█████████████████▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓████████▒
    ▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒██████████████████▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓███████▒
    ▓▓▓▓▓▓▓ ▒▒▒▒▒▒▒▒▒██████████████████▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓████████▒
    ▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒█████████████████ ▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓████████▒
    ▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒████████▓▓████████▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓ ████████▒
    ▓▓▓▓▓▓ ▒▒▒▒▒▒▒▒▒▒▒█████▓▓▓▓ ▓██████▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓█████████
    ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒█▒████▓▓▓▓▓▓▓▓██████▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓█████████
    ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒████▓▓▓▓▓▓▓▓██████▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓████████▒
    ▓▓▓▓▓ ▒▒▒▒▒▒▒▒▒▒█████▓▓▓▓▓▓▓▒██████▒▒▒▒▒▒▓▓▓▓▓▓▓▓ █████████▒
    ▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒████▓▓▓▓▓▓▓▒▒▒▒██▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓█████████▒
    ▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒████▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓████████▒▒
    ▓▓▓▓ ▒▒▒▒▒▒▒▒▒▒▒████▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒ ▒▓▓▓▓▓▓▓▓█████████▒▒
    ▓▓▓▒ ▒▒▒▒▒▒▒▒▒▒▒█████ ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒ ▒▓▓▓▓▓▓▓▓▓█████████▒▒
    ▓▓▓▓ ▒▒▒▒▒▒▒▒▒▒▒▒████▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒ ▒▒▓▓▓▓▓▓▓▓▓▓████████▒▒▒
    ▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒█████▓▓▓▓▓▓▓▓▓▒▒▒  ▒▒▓▓▓▓▓▓▓▓▓▓▓▓███████ ▒▒▒
    ▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒█████▓▓▓▓▓▓▓▓▓▓▓▓▒▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓████████▒▒▒
    ▓▓▓▓▓ ▒▒▒▒▒▒▒▒▒▒██████ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████████▒▒▒
    ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒██████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▒▒▒
    ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒██████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▒▒▒▒
    ▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒██████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓███████████▒▒▒▒▒
    ▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒███████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████▒▒▒▒▒
    ▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒███████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓████████████▒▒▒▒▒▒
    ▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒██████████▓█▓▓▓▓▓▓▓▓ ▓▓███████████ █▒▒▒▒▒▒
    ▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒███████████▓▓▓▓▓ ▓▓███████████████▒▒▒▒▒▒▒
    ▓▓▓▓▓▓▓▒ ▒▒▒▒▒▒▒▒▒▒██████████████▓▓█████████████████▒▒▒▒▒▒▒▒
    ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒█████████████████████████████▒█▒▒▒▒▒▒▒▒▒
    ▓▓▓▓▓▓▓▓▒ ▒▒▒▒▒▒▒▒▒▒▒█ ███████████████████████▒██▒▒▒▒▒▒▒▒▒▒▒
    ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒██ ██████████████████████▒▒▒▒▒▒▒▒▒▒▒▒▒
    ▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒████████████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
    ▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

Smoother Waves

By removing the "empty" cells entirely, a smoother wave pattern can form. This is caused by the fact that all of the cells have a match with another, and there are no extra cells to form at edge cases.

The main difference from this wave and the previous wave is the fact that it has "return me" at the end. Which means it won't change from it's original value.

This one is my favorite pattern!

    ▓▒▒▒▒▒▒▒▒▒▒▒████████████▓▓▓▓▓▒▒▒▒▒▒▒███████████████▒▒▒▒▒▒▒▒▒
    ▒▒▒▒▒▒▒▒▒▒█████████████▓▓▓▓▓▓▒▒▒▒▒▒█████████████████▒▒▒▒▒▒▒▒
    ▒▒▒▒▒▒▒▒███████████▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒█████████████████▒▒▒▒▒▒▒▒
    ▒▒▒▒▒▒███████████▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒████████▓▓▓▓███████▒▒▒▒▒▒▒
    ▒▒▒▒▒██████████▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒██████▓▓▓▓▓▓▓▓█████▒▒▒▒▒▒▒
    ▒▒▒▒▒████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒███████▓▓▓▓▓▓▓▓▓█████▒▒▒▒▒▒
    ▒▒▒▒███████▓▓▓▓▓▓▓▓▓▒▒▒▓▓▓▓▒▒▒▒▒▒██████▓▓▓▓▓▓▓▓▓▓▓████▒▒▒▒▒▒
    ▒▒▒▒█████▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▓▓▒▒▒▒▒▒██████▓▓▓▓▒▒▓▓▓▓▓█████▒▒▒▒▒
    ▒▒▒▒█████▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████▓▓▒▓▒▓▓▓▓▓▓████▒▒▒▒▒
    ▒▒▒▒████▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████████▒█▒▒▓▓▓▓▓█████▒▒▒▒
    ▒▒▒▒█▒███▓▓█▒▒▒▒▒▒▒▒██▒▒▒▒▒▒▒▒▒▒▒▒▒███████▒▒▒▒▓▓▓▓▓▓████▒▒▒▒
    ▒▒▒▒▒▒█████▒▓▒▒▒▒▒▒█████▒▒▒▒▒▒▒▒▒▒▒████████▒▒▒▓▓▓▓▓▓████▒▒▒▒
    ▒▒▒▒▒█▒████▒▒▒▒▒▒▒████████▒▒▒▒▒▒▒▒▒▒▒████▒▒▒▒▒▓▓▓▓▓█████▒▒▒▒
    ▒▒▒▒▒▒▒██▒▒▒▒▒▒▒▒▒█████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓█████▒▒▒▒
    ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓█████▒▒▒▒▒
    ▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒███████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓█████▒▒▒▒▒
    ▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█▒▓▓██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓█████▒▒▒▒▒▒
    ▓▓▒▒▒▒▒▒▒▒▒▒▒▓▒▒▒▒██▓▓███████▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓█████▒▒▒▒▒▒
    ▓▓▓▓▒▒▒▒▒▒▒▓▓▓▓▒▒▒▓▒▓█▓██████▒▒▒▒▒▓▓▒▒▓▓▓▓▓▓▓▓▓▓█████▒▒▒▒▒▒▒
    ▓▓▓▓▓▓▒▒▒▓▓▓▓▓▓▓▓▒▒▓▓▓███████▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████▒▒▒▒▒▒▒
    █▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████▒▒▒▒▒▒▒▒
    ███▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███████▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓███████▒▒▒▒▒▒▒▒
    █████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███████▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓████████▒▒▒▒▒▒▒▒▒
    ▒██████▓▓▓▓▓████▓▓█████████▒▒▒▒▓▓▓▓▓▓▓▓▓▓██████████▒▒▒▒▒▒▒▒▒
    ▒▒▒███████████████████████▒▒▒▒▒▓▓▓▓▓▓▓▓██████████▒▒▒▒▒▒▒▒▒▒▒
    ▒▒▒▒▒████████████████████▒▒▒▒▒▓▓▓▓▓▓███████████▒▒▒▒▒▒▒▒▒▒▒▒▒
    ▒▒▒▒▒▒▒████████████████▒▒▒▒▒▒▒▓▓▓▓▓██████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
    ▒▒▒▒▒▒▒▒▒▒▒▒▒████████▒▒▒▒▒▒▒▒▓▓▓▓▓██████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
    ▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒███▒▒▒▒▒▒▒▒▒▒▓▓▓▓██████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
    ▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓█████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

https://play.golang.org/p/z95dboosEEc

Echo Chambers

https://play.golang.org/p/PoovtxVt3D_n

These happen when "enemies" are given priority to take over a cell, specifically when it only takes at least 1 or 2 to do so.

    if (enemies >= 2) {return enemy}

This often does the trick.

Static Echo Chambers

When the echo overtake the entire map, they essentially become static. They simply shift between the different values, but the pattern remains. These are a bit intense to witness, a bit like looking at the sun. Gives you a sense of urgency. Mathematical.. urgency....

Probably would cause seizures.

    ▒█▓▒██▓█▓██▒▒██▓█▒▓▓██▒▒▒█▓▓▒▒▓▒░█░▓██▒▓█▒▒▓▓▒▒▒██████▒▒▓▓▓▓
    ▒█▓▒█▓▓▒▓▓████▓▓█▓▒█▓████▓▒▒██▓▒██▒▒▓█▒▓██▒▒▒▒███▓▓▓▓▓▒▒▒▒▒▓
    ██▓▒█▓▒█▒▓▓██▓▓▒▓██▒▒▓█▓█▓█▓▓▒▒█▓▓█▓▓█▒▓▓██▒▒██▓▓▓▒▒▒█████▒▒
    █▓▓▒█▓▒█▒▒▓█▓▓▒▒▓▒▒▓█▓▓▓▒▒█▓▒▓▓░██▒▒▓█▒▒▓▓█▒██▓▒▓▒▒██▒▓▓▓██▒
    ▓▒█▓▒█▒▓█▒▓▓▓▒▒██▓██▒▒▓▒▒██▓█▒░░░▓▒▓▓██▒▒▓███▓█▒▒▓█▓▓▓█▒▓▓██
    ▓▒█▓▒█▒▓█▒▓▓▓▓█▓▓▒▒▒▓▓█▒██▓▒▒█▒░▓▒▓▓▓█▒▒▓▓██▓▓▒█▒▒▒█▒▓█▒▒▓▓█
    ▓▒█▓▒▓███▒▒▓▓▒▒██▓▓██▓███▓▓▒██▓▓██▓█▒▒▓▒█▓█▓█▒▓█▒▒▒██▓██▒▒▓█
    ▓▒██▓▓▒▒▓█▒▓▓▓▒▒███▒████▓▓▓▒▒▓▒▒▓▓█▒█▓██▒▒▓▓█▒▓▒▓▓▓▒▓█▓██▒▓▓
    ▓▒██▓▓▒▓▓█▒▓▒▓▓▒▒▒▒▒▒▒█▓▓▒▒▒▒▒█▓▒█▓▒▒▒█▒▒▓▓▒▒██▒▓▓▓▒█▒▓▓█▒▒▓
    ▒▒█▓▓▒▒█▓█▒▒▓██▓▓▓▓▓▒▒█▓▒▒██▒▒▓▓██▓▓▓▓▒▒▓▓▓▓▓▒█▒▓▓▒▒██▒▓▒█▓▓
    ▒██▓▒██▓▒█▒▓█▓█▓███▓▓▓▒▒██▓▓▓▓██▒▒█▓█▓▓▓▓█▓▒█▒▓▒▓▓▒█▓▓▒▓▓█▒▓
    ▒█▓▓▒▓█▒█▒▒▓▒▓▓▓███▓▓▒▒██▓▓▒▓▓█▒▒▒▓▓▓█▒▓▓▓▓▒▒▓██▒▒▒██▒█▒█▒▒▓
    ▒█▓▒█▓██▒▒▓▓█▒▒▒▓▓▓█▒▒▒▒▒▒██▒█▒▒█▓▓▒▓█▓▒▓▓▒█▓██▒▒▒██▓▓█▓▓▒▓▓
    ▒██▓█▒█▒▒▓▓▒▓▒█▒▓█▒▓▓█▓▒▒█▓▓██▒██▓▓▒▒▓█▒█▓▒█▓▒█▓███▓▓▒░▒█▓▓█
    █▓▒▒██▓██▒▒██▓▒█▒▓███▓▒▓▓▓▒█▓███▓▒▒█▓▓█▒▓▓▓▒▓█▓▓██▓█▒█▓▒▓▓██
    █▓▒█▒▓███▒▒▒█▓▒▒█▒▒▒▒▒▓▓▓▒▒████▓▓▒██▓▒▒▓▓█▒▒▓▓▓▒▓▓█▓▒█▒███▒▒
    █▓▓▒▒█▒▓▓██▒██▓▓█▓▓▓▓▓▓██▓▓▒█▓█▒██▓▒▒▓▒▒▓█▓▒▒▓▒▒█▓▒▓▓▒▒▓▓█▒░
    ██▓▓▒▒█▓▓██████████▓▓▓███▓▓▒█▒▓▒▒▓███▓█▒▓▒██▒▒▒█▒███▓▓█▒█▒░░
    ▒█▓▒▒██▒▒▓▓▓██▒▒███▓▒██▒██▓▒▓█▒▓█▒█▒██▓▓███▓█▓▒▒▓█▓██▓▓▒▓░░░
    ▒█▓▒██▓▓▒█▒▒▓████▓▒█▓█▒▒▒█▓█▒▓██▓█▒▒▒████▒█▓▒▒█▓██▒░▓▓▓▓▓█░░
    ▒█▓▓▒▓▒▒██▓▒▓▓██▓▒▒█▓██▒▒██▓▓▒▒█▒▒▒▓▒▒▒▒▒▒██▓▓▓██▒▒▓▒▓█▒▓▓██
    ▒██▓▒██▓▓▓▒█▒█▒▒▒█▓▒█████▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▒▒█████▒▒█▒▓▒▒█▒▒▓█
    ▒▒█▓▓▒▒███▒▓▓█▒▒▓▓▓███▓▓▒▒▒▒▒▒▒▒▓▓██████▓▓▒▒▒▒▒██████▓▓██▒▓█
    ▓▒██▓▒▒██▓▓▒██▒▓▓███▒▓▒▒██▓████▒▒▓██▒▒▒██▓▓▓▒▒██▓▓▓▓▒▒█▓█▒▓▓
    ▓▒▒██▓▓▒▒██▒▒▓▒▓██▒▒▒█▒█▒▓█▒▓▓██▒▓█▒▒▓▒▒██▓▓▒██▓▓▒▒▒▓▒█▒█▒▒▓
    ▓▓▒▒█▒▓█▒▓█▒▒▓█▓█▒▒▒▒█▓█▓▓▒▓█▒▓█▒▓█▒▓▓▓▒▒██▓▒█▓▓▒█▒█▒▒▒▓▓█▒░
    █▓▓▒▓██▓▓▒▒▓▓▒█▓█▒▓▓▒█▓▒█▒███▒▓█▒▓█▒▓█▓▓▒▒█▓▒▒▓▓▒█▓██▒▒▓██▒░
    ██▓█▒▒██▓▓█▓██▓▒█▒▓▓▒█▓▒▓█▒▓▒█▓█▒▓█▒▓██▓▓▒█▓▒██░█▓▒▓█▒▓▓█▒▒▓
    ▒█▒▓▓▓▒█▓▒▒██▒▒█▓▒▓▓▒█▓██▓█▓█▓▒█▒▓█▒▓███▓▒██▓▓█▒░█▓▓█▒▓██▒▓▓
    ▒▒██▓▓▒░░▓▒▒▒▒▓▓██▒▓▓▓▒▒█▒███▒█▒▒▓█▒▓███▓▒▒███▒░░█▒▒▒▓▓█▒▒▓█

Echo / Wave Combo

Somewhere in between an echo chamber and a wave. They are a bit rough around the edges.

    ▓▓▒▒▒████████▓▓▓█▓████████████████▓▓▓▓▓▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓█
    ▓▓▒▒▒█████▓▓▓▓▓▓▓▓███████████████▓▓▓▓▓▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓
    ▒▓▒▒▒▒▒████▒▓▓▓▓▓▓▓▓█████████████▓▓▓▓▓▓▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓
    ▒▒▒▒▒▒███▓▓▓▓▓▓▓▓▓▓▓▓▓████████████▓▓▓▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓
    ▒▒▒▒▒▒▒▒███▓█▓▒▓▓▓▓▓▓███▓███████▓█▓▓▓▒▓▒▒▒▒▒▒▒▒▒▒▓▒▓▓▓▓▓▓▓▓▓
    ▒▓▒▒▒▒▒▒▒▒▓▓▓▒▓▒▒▓▓▓▓▓▓█▓█▓█████▓█▓▓▓▒▓▒█▒▒▒█▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓
    ▓▓▓▓▒▒▒▒▒▒███▒█▒▓▓▓▓▓▓▓▓▓█▓██████▓█▓▓▒▓▒███▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓
    ▓▓▓▒▒▒▒▒▒▒▒▒█▒█▒▒▒▓▒▓▓▓▓█▓████████▓▓▓▓███████▒█▒▒▒▒▒▒▓▓▓▓▓▓▓
    ▓▓▓▓▓▓▒▒▒███▒█▒▒▒▒▒▓▒▓███████████████████████▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓
    ▓▓▓▓▓▓▒▒▒▒▒▒█▒▒▒▒▒▒██▓▓█████████████████████████▒▒▒▒▒▓▓▓▓▓▓▓
    ▓▓▓▓▓▓▓▓▒▓██▒▒▒▒▒▒▓▓█▓█████████████████████████▒▒▒▒▒▒▒▒▒▓▓▓▓
    ▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▓▒▓█▓██████████████████████████▒█▒▒▒▒▒▒▓▓▓▓
    ▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓████████████████████████████▒█▒▒▒▒▒▒▓▓▓▓
    ▓▓▓▓▓▓▓▓▓▓▒▒▒▒████▓█████████████████████████████▒▒▒▒▒▒▒▒▓▓▓▓
    ▓▓▓▓▓▓▓▓▓▒▓▓▓▓▓██▓█████████████████████████████▒▒▒▒▒▒▒▒▒▓▒▓▓
    ▓▓▓▓▓▓▓▓▓▒▓▒▒▒▓█▓█▓████████████████████████████▒▒▒▒▒▒▒▒▒▓▒▓▓
    ▓▓▓▓▓▓▓▓▓▓▓▒▓▓▓▓▓█▓█████████████████████████████▒▒▒▒▒▒▒▓▒▓▓▓
    ▓█▓▓▓▓▓▓▓▓▓▒▒▒▓██▓█████████████████████████████▒▒▒███▓▒▓▓▓▓▓
    █▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███████████████████████████████▒█▒▒▒▒▓▓▓▓▓▓▓
    ███████▓▓▓▓▓▒▒████████████████████████████████▒█▒▒▒▒████▓▓▓▓
    ▓█▓▓▓▓▓███▓▓▓▓▓███████████████████████████████▒▒▒▒▒█▒▓█▓▓▓▓▓
    ███████▓█▓█▓▓▓███████████████████████████████▒▒▒▒▒▒█▒████▓▓▓
    ██▓▓▓▓█████▓▓█▓███████▒██████████████████████▒█▒▒▒▒▒▒▒█▓█▓█▓
    █████████████▓██████▒▒▒▒██████████████████▒█▒█▒▒▒▒▒▒█▒█▓█▓██
    ██▓▓▓▓▓████▓▓█████▒█▒▒▒▒██████████████▒▒████▒▒▒▒▒▒▒▒▒▒██████
    █████████████████▒▒▒▒▒▒▒▒████████████████▒█▒▒▒▒▒▒▒▒▒▒█▒█████
    ██▓▓▓███████████▒▒▒▒▒▒▒▒▒███████████▒▒▒▒▒▒█▒▒▒▒▒▒▒▒▒▒▒▒█▒▒██
    █████████▒▒▒██████▒▒▒▒▒▒▒▒██████████▒████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
    ███▓▓████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████████████▒▒▒▒██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
    ░████████▒▒▒█▒▒▒█▒▒▒▒▒▒▒▒████████████▒████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

https://play.golang.org/p/c379vE4oXB_j

Another Example:

    ████████████████████▒▒▒▒▒▒▒▒██▒▒██████▒███▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓
    ███████████████████▒▒▒▒▒▒▒██▒▒██████████▒▒▒█▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓
    ███████████████████▒█▒▒▒▒█▒█████████████████▒▒▒▒▒▒▒▓▒▓▓▓▓▓▓▓
    ████████████████████████▒█████████████████████▒▒▒▒▒▒▒▓▓▓▓▓▓▓
    █████████████████████▒█▒██████████▓▓█████████▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓
    ███████████████████████████▓▓▓▓▓▓████▓▓██████▒█▒▒▒▒▒▓▒▓▓▓▓▓▓
    █████████████████████████▓███▓▓█▓▓▓▓▓▓█▓█████▒█▒▒▒▒▒▒▓▓▓▓▓▓▓
    █████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████▒▒▒▒▒▒▓▓▓▓▓▓▓
    ███████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█▓████▒█▒▒▒▒▒▒▓▓▓▓▓▓
    ████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████▒▒▒▒▒▒▓▓▓▓▓▓
    ██████████████████████▓█▓▓▓▓▓▓▓▓▒▒▓▒▓▓▓▓▓███████▒▒▒▒▒▒▓▓▓▓▓▓
    ██████████████████████▓█▓▓▓▓▓▒▒▓▓▒▓▓▒▓▓▓▓█▓█████▒▒▒▒▒▒▓▓▓▓▓▓
    ██████████████████████▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▓▓▓▓█▓████▒▒▒▒▒▓▒▓▓▓▓▓▓
    ███████████████████████▓▓▓▓▓▒▓▒▒▒▒▒▒▓▓▓▓▓██████▒▒▒▒▒▒▒▓▓▓▓▓▓
    ███████████████████████▓▓▓▓▓▒▒▒▒▒▒▒▒▓▒▓▓▓▓████▒▒▒▒▒▒▒▒▓▓▓▓▓▓
    ██████████████████████▓▓▓▓▓▓▓▒▒▒▒▒█▒▒▒▓▓█▓████▒▒▒▒▒▒▓▒▓▓▓▓▓▓
    ██████████████████████▓▓▓▓▓▒▓▒▒█▒▒█▓█▓▓▓███████▒▒▒▒▒▒▓▓▓▓▓▓▓
    ██████████████████████▓▓▓▓▓▒▒▒▒▒█████▓▓▓▓████▒█▒▒▒▒▒▒▓▓▓▓▓▓▓
    ██████████████████████▓▓▓▓▓▓▒▒▒█████▓▓██▓████▒▒▒▒▒▒▒▓▒▓▓▓▓▓▓
    ███████████████████████▓▓▓▓▓▒▒▒█▒█████▓███████▒▒▒▒▒▒▓▓▓▓▓▓▓▓
    ███████████████████████▓▓▓▓▒▒▒▒▒▒█████████████▒▒▒▒▒▒▒▓▓▓▓▓▓▓
    ██████████████████████▓▓▓▓▓▒▓▒▒▒█▒▒██▒███▒▒██▒▒▒▒▒▒▓▒▓▓▓▓▓▓▓
    ██████████████████████▓█▓▓▓▒▓▒▒▒▒▒▒▒▒██▒██▒▒▒▒▒▒▒▒▒▓▒▓▓▓▓▓▓▓
    ██████████████████████▓█▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓
    ███████████▒▒▒██████████▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▒▓▓▓▓▓▓▓█
    █▒▒████▒▒▒█████████████▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▒▒▓▓▓▓▓▓▓▓
    ▒▒███████▒▒▒▒▒█████████▓█▓▓▓▓▓▒▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒▒▒▓▓▓▓▓▓▓▓▓█▓
    ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████████▓▓▓▓▓▓▓▒▒▒▓▒▒▒▒▒▒▓▓▒▓▓▓▓▓▓▓▓▓▓▓▓▓██
    ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████████▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█
    ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█▒█████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█

https://play.golang.org/p/v760fHAeqG3

Patchers

After a relatively short number of iterations, the Patchers example causes a few rounded clumps to quickly form.

    ██████▓▓▓▓▓▓▓▓▓███████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓███████▒▒▒▒▒▓▓▓▓▓
    ██████▓▓▓▓▓▓▓▓▓███████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓███████▒▒▒▒▒▓▓▓▓▓
    ██████▓▓▓▓▓▓▓▓▓███████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓███████▒▒▒▒▒▓▓▓▓▓
    █████▓▓▓▓▓▓▓▓▓▓██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓███████▒▒▒▒▒▓▓▓▓▓
    ████▓▓▓▓▓▓▓▓▓▓▓██████▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓███████▒▒▒▒▒█████
    ████▓▓▓▓▓▓▓▓▓▓▓▓████▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓███████▒▒▒▒██████
    ████▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓████████▒▒▒▒██████
    █████▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓████████▒▒▒▒██████
    ██████████▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓███████▒▒▒▒▒▒█████
    ███████████▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓██████░▒▒▒▒▒▒▒▒▒▒▒
    ███████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████▒▒▒▒▒▒▒▒▒▒▒▒
    ███████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████▒▒▒▒▒▒▒▒▒▒▒▒
    ███████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████▒▒▒▒▒▒▒▒▒▒▒▒
    ███████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████▒▒▒▒▒▒▒▒▒▒▒▒
    ███████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓███████▒▒▒▒▒▒▒▒▒▒▒
    ███████▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓█████████████▒▒▒▒▒
    ▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓██████████████▒▒▒▒
    ▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▓▓▓▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓██████████████▒▒▒▒
    ▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓██████████████▒▒▒▒
    ▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓██████████████▓▓▓▓
    ▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓█████████████▓▓▓▓▓
    ▓▓▓▓▓▓▓▓▓████▒▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓██████████████▓▓▓▓▓
    ▓▓▓▓▓▓▓▓█████▒▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒███████████████▓▓▓▓▓
    ▓▓▓▓▓▓▓██████▒▒▒▒▒▒▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████████████████▓▓▓▓
    █████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████████████████▒▒▒▒
    █████████████░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█████████████████▒▒▒▒
    ██████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████████████████▒▒▒▒
    ███████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒███████████████████▒▒▒▒
    ███████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒███████████████████▒▒▒▒
    ███████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒███████████████████▒▒▒▒

https://play.golang.org/p/JcbjAw0nekL

This can be given a bit more variation in some cases, and cause the patches to form a bit more quickly. This one is more likely to remain in its beginning state, and it more closely resembles the start.

    ████▓▓▓▓▓▒▒▒▓▓▓▒▒▒▒▒▒▒▒█████████▒▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▓▓▓███████
    ████▓▓▓▓▓█▒▒▓▓▓▒▒▒▒▒▒▒▒█████████▒▒▓▓▓▓▓▓▓█▒▒██▒▒▒▒▓▓▓███████
    ████▓▓▓▓████▓▓▓▒▒▒▒▒▒▒▓█████████▒▒▓▓▓▓▓███████▒▒▒▒▓▓▓███████
    ███▓▓▓▓▓▓███▓▓▒▒▒▒▒▒▒▓▓▓█████████▓▓▓▓█████████▒▒▒▒██▓▓████▓▓
    ██▓▓▓▓▓▓▓███▒▒▒▒▒▓▓▓▓▓▓▓█████████▓▓▓▓█████▒▒██▒▒▒▒███▓▓▓██▓▓
    ▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓█████████████▓██████▒▒▒▒▒▒▒▒█████▓▓▓▓▓▓
    ▓▓▓▓▓██▓▓▓▓▓▒▒▒▒▓▓▓▓▓███▓▓███████████████▒▒▒▒▒▒▒█████▓▓▓▓▓▓▓
    ▓▓▓▓▓██▓▓▓▓▒▒▒▒▒▓▓▓▓▓██▓▓▓▓▓█████████▒███▒▒▒▒▒▒▒████▓▓▓▓▓▓▓▓
    ▓▓▓▓███▓▓▓█▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓████████▒▒▒▒▒▒▒▒▒▒▒▒▓███▓▓▓███▒▒
    ▓▓▓████▓▓███▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓████▓▓█▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓██▓▓▓███▒▒
    █████████████▒▓▒▒▒▓▓▓▓▓▓▓▓██████▓▓▓▒▒▒▒▒▒▒▒▒██▓▓▓▓▓▓▓▓▓███▒▒
    █████████████▓▓▓▒▒▓▓▓▓▓▓▓██████▓▓▓▓▓▓▓▓▓▒█████▓▓▓▓▓▓▒▒▒▓▓▓▒▒
    ███████████▓▓▓▓▒▒▒▒▓▒▒▓▓▓██████▓▓▓██▓▓▓▓██████▓▓▓▓█▒▒▒▒▒▓▓▓▓
    ████████▒▒▒▓▓▓▓▓▒▒▒▒▒▒▓▓▓███▒▒▓▓▓▓██▓▓▓▓████████▓███▒▒▒▒▓▓▓▓
    ████████▒▒▒▒▒▓▓▓▒▒▒▒▒▒▓▓▓▓▓▒▒▒▓▓▓▓▓▒▓▓▒▒███▓▓████▓█▓▓▒▒▒▓▓▓▓
    ▒▒▒█████▒▒▒▒▒▒▒▒▒▒▒▒███▓▓▓▓▒▒▒▓▓▓▓▒▒▒▒▒▒▒▒▓▓▓▓██▓▓▓▓▓▓▓▒▓▓▓▓
    ▒▒▒█████▒▒▒▒▒▒▒▒▒▒▓▓████▓▓▓▒▒▓▓▓▓▓▒▒▒▒▒▒▒▒▒▓▓▓▒▒▓▓▓▓▓▓▓▓▒▒▒▒
    ▒▒▒▒█▓▓▓▒▒▒▒▓▓▓▒▒▓▓▓▓█████▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▓▓▓▒▒▒▓▓▓▓▓▓▓▒▒▒▒
    ▒▒▒▒▓▓▓▓▒▒▒▓▓▓▓▓▓▓▓▓███████▓▓▓▓▓▓▓▓▓██▒▒▒▒▒▒▒▒▒▒▒▒███▓▓▓▒▒▒▒
    ▒▒▒▒▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓███▒▒▒▒▒▒▒▒▒▒██████▒▒▒▒
    ▒▒▒█▓▓▓▓▒▒▒▒▒▒▒▓▓▓▓██████████▓▓▓▓▓▓▓▓█████▒▒▒▒▒▒▒▒██████▒▒▒▒
    █████▓▓▓▒▒▒▒▒▒▒▒▒▒▒████▒█████▓▓▓▓▓▓▓▓▓████▒▒▒▒▒▒▒▒▒▒▓▓███▒██
    █████▓▓▒▒▒▒▒▒▒▒▒▒▒▒███▒▒▒▒███▓▓▓▓▓▓▓▓▓██▓▓▓▒▒▒▒▒▒▒▒▒▓▓▓█████
    █████▒▒▒▒▒▒▒▒▒▒▒▒▒▒███▒▒▒▒███████▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▓▓▓▒▒██
    █████▒▒▒▒▒▒▒▒▒▒▒▒▒▒████▒▒▒▓▓█████▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▓▓▓▒▒██
    ████████▒█▒▒▒▒▒▒▒▒▒██████▒▓▓▓███▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▓▓▒▒▓▓▓▓▒▒██
    ███████████▒▒▒▒▒▒▒▒▓▓█████▓▓▓▓█▓▓▓▒▒▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓
    ▒▒███▒▒█████▒█▒▒▒▒▒▓▓████▒▒▓▓▒▒▓▓▒▒▒▒███▓▓▓▓▓▒▒▒▓▓▓▓▓▓██▓▓▓▓
    ▒▒███▒▒▒▓▓▓████▒▒▒▒▓▓▓███▒▒▒▒▒▒▒▒▒▒▒█████▓▓▓▓▒▒▒▓▓███████▓▓▓
    ▒▒███▒▒▒▓▓▓████▒▒▒▒▓▓▓███▒▒▒▒▒▒▒▒▒▒▒█████▓▓▓▓▒▒▒▓▓███████▓▓▓

https://play.golang.org/p/bIgkIt_6gqi

IDK

I really don't know what the hell to call these anymore.

    ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▓▒▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒█▒███████▓▓▓▓▓▓▓▓▓███████░░
    ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▓▓▓▓▒▓▓▒▒▒▒▒▒▒▒▒▒█▒███████▓█▓▓▓▓▓▓▓████████░
    ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▓▒▓▒▒▒▒▒▒▒▒▒▒▒▒▒█▒▒▒██▓▓▓▓▓▓▓▓▓▓██████████
    ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▒▒▒▒▒▒▒▒▒▒▒▒▒█▒▒▒█▒▓█▒▒▓▓▓▓██████████
    ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒█▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▒█▓▒▓▓▒▒▓▓██████████
    █▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█▒▒▓▒▓▓▓▓▓▓█████████
    ▓█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒█▒▒█▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█▒▓▓▒▓▓▓▓▓▓█▓█████
    ▓█▓█▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▒▓▓▓▓▓▓▓██████
    ██▓█▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▒▓▓▓▓▓▓▓▓▓▓▓█▓██
    █▓███▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒█▒▒▒▒▒▒▒▒▒▒▒▒▓▒▓▒▓▓▓▓▓▒▒▓▓▒▒▓▓▓▓▓▓█▓██
    ██████▓▓▓▓▓▓▒▒▒▒▒▒█▒█▒▒▒█▒▒▒▒▒▒▒▒▒▒▒▒▓▒▒▓▓▒▒▒▓▒▒▓▓▓▓▓▓▓▓██▓█
    ████▓██▓▓▓▓▓█▒▒▒▒▒▒▒▒█▒▒▒▒█▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓██▓
    ▓▓█▓▓▓▓██▓█▓▒▒▒▒▒█▒█▒▒▒▒█▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▒▓▒▓▒▓▓▓▓▓▓▓▓▓▓▓█▓█▓
    ██▓██████▓███▒▒▒█▒▒██▒█▒█▒█▒▒▒█▒▒▒▒▒▒▓▒▓▒▓▒▓▓▓▓▓▒▓▓▓▓▓▓▓▓▓█▓
    ▓▓███████████▒▒▒▒▒▒▒▒▒▒██▒▒▒▒▒▒▒▒▒▒▒▒▓▒▓▓▓▒▓▓▒▒▒▓▓▓▓▓▓▓█▓▓▓▓
    █████████████▒██▒▒█▒▒▒▒▒▒▒▒█▒█▒█▒▒▒▒▒▓▒▒▓▓▓▒▓▓▓▓▓▓▓▓▓▓██▓▓▓█
    ██████████████▒▒█▒█▒▒▒▒▒▒▒▒▒██▒▒▒▒▒▒▒▒▒▒▒▒▓▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓██
    ████████████▒▒▒▒▒█▒▒█▒▒▒▒▒▒▒█▒█▒▒▒▒▓▒▒▒▒▓▓▒▓▓▓▓▓▓▓▓▓▓███▓▓█▓
    ███████████▒█▒▒▒▒█▒▒█████▒█▒▒▒▒▒▒▒▒▓▓▒▒▒▒▒▓▓▓▓▓▓▓▓████▓█████
    ██████████▒▒▒▒▒██▒████████▒▓▒▒▒▒▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓█▓▓██████▓█
    █▒▒▒▒██▒▒▒▒▒▒█▒█████████████▒▒▒▒▓▓▓▓▓▒▒▓▒▓▓▒▓▓▓▓▓███████████
    █▒██▒▒▒▒█▒▒▒▒█████████████▒▒▒▒▓▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█▓▓█████████
    █▒█▒▒█▒█▒▒▒▒▒▒███████████▒█▓▒▓▓▓▓▒▓▓▓▓▓▒▒▓▒▓▓▓▓▓████████████
    █▒▒██▒█▒▒▒▒▒▒████████████▓█▒▒▒▓▓▓▒▓▓▓▓▓▓▓█▓▓████▓███████████
    ████▒█▒▒▒▒▒▒█████████████▓██▓▒▓▓▓▓▓▓▓▓▓▓▓▓███▓██▓███████████
    █▒▒▒█▒▒▒▒▒▒▒██████████████▓█▓▓▓▓▓▓▓▓▓▓▓████▓███▓██▓█████████
    ▒█▒▒▒▒▒▒▒▒█▒▒█████████████▓█▓▓▓▓▓▓▓▓▓▓▓▓█████▓▓█████████████
    ▒▒██▒▒▒▒▒▒▒▒▒████████████▓█▓▓▓▓▓▓▓▓▓█████▓█████▓████████████
    ░▒▒▒▒▒▒▒▒▒▒▒▒▒████████████▓▓▓▓▓▓▓▓▓▓▓▓▓██▓██▓▓██████████████
    ░░▒▒▒▒▒▒▒▒▒▒▒▒███████████▓▓▓▓▓▓▓▓▓▓▓███▓▓█████▓▓████████████

https://play.golang.org/p/pAEb9O9z0lC

Documentation

Overview

Special Test of Cellular Automata with 3 numbers.

Instead of using a matrix of booleans values, use a matrix of numbers between [0 - 255] is used (1 byte). Has the potential to be used for many different values, but the rules for now will be:

0 = Empty 1 = Red 2 = Green 3 = Blue

Each color could have a special set of rules, but a generalized one is:

-> Similar Colors Replicate ->

Special "eating" rules, where one color ALWAYS is taken over by a specific color, if that color is nearby. The following reads like this:

Color1 is taken over by Color2 Color1 <- Color2

Red <- Blue Blue <- Green Green <- Red

I would like to think of them as Fire, Water, Earth I guess that's just the alchemist in me ;)

Examples

https://play.golang.org/p/7EpEBggv8ly

Credits

- Re-used some of the code from the golang.org homepage. - Based on Conway's Game Of Life.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abundance

func Abundance(neighborhood map[uint8]uint8) ([]uint8, uint8)

Abundance the color(s), which corresponds to a value [1-3], and the number of counted neighbors of that color [0-8]. Since there could be a tie for the highest count, multiple colors are returned in an array.

func NewNeighborhood

func NewNeighborhood() map[uint8]uint8

Neighborhood represents the total color counts in the surrounding cells.

func WhoEatsMe

func WhoEatsMe(myColor uint8) uint8

WhoEatsMe returns the color that consumes the specified color, if nearby. If will only return a 0 if it passes through all of the cases.

Types

type Field

type Field struct {
	// contains filtered or unexported fields
}

Field represents a two-dimensional field of cells.

func NewField

func NewField(w, h int) *Field

NewField returns an empty field of the specified width and height.

func (*Field) Next

func (f *Field) Next(x, y int) uint8

Next returns the state of the specified cell at the next time step.

func (*Field) Set

func (f *Field) Set(x, y int, b uint8)

Set sets the state of the specified cell to the given value.

func (*Field) WhatIs

func (f *Field) WhatIs(x, y int) uint8

WhatsIs reports the number that is at the specified cell. NOTE: THIS WRAPS AROUND THE MAP.

type GridState

type GridState struct {
	GridState string
}

type Life

type Life struct {
	// contains filtered or unexported fields
}

Life stores the state of a round of Conway's Game of Life.

func NewLife

func NewLife(w, h int) *Life

NewLife returns a new Life game state with a random initial state.

func (*Life) AlterAt

func (l *Life) AlterAt(x, y int, val uint8)

AlterAt changes the value at a specific position of the field.

func (*Life) LifeStateMessage

func (l *Life) LifeStateMessage() []byte

LifeStateMessage returns an encoded Json message, ready to be sent.

func (*Life) Step

func (l *Life) Step()

Step advances the game by one instant, recomputing and updating all cells.

func (*Life) String

func (l *Life) String() string

String returns the game board as a string.

Directories

Path Synopsis
=========================================================================== > Game of Life and War ___________________________________________________________________________ Grid Square Types 0 = Neutral 1 = Player 1 2 = Player 2 3 = Red 4 = Pink [5 - 10] = Red, in different Credits - Joshua Fan - The Idea for the "Game of War" - Golang.org - Code Snippets for Implementation of Conway's Game of Life - John Horton Conway - For inventing the "Game of Life" ___________________________________________________________________________ ===========================================================================
=========================================================================== > Game of Life and War ___________________________________________________________________________ Grid Square Types 0 = Neutral 1 = Player 1 2 = Player 2 3 = Red 4 = Pink [5 - 10] = Red, in different Credits - Joshua Fan - The Idea for the "Game of War" - Golang.org - Code Snippets for Implementation of Conway's Game of Life - John Horton Conway - For inventing the "Game of Life" ___________________________________________________________________________ ===========================================================================

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL