Hey lol it's me again.
I'm sure you've heard at least once of the Game of Life, made by mathematician John Conway (RIP, died from Covid last year). It revolves around 3 rules that define the actions of dead and alive cells throughout a grid. Based on the start pattern, the actions of these cells is determined by the rules and can evolve into complex shapes, and with proper time and effort, can be coded into functioning systems. The rules are as follow:
Any alive cell with less than 2 alive neighbors must die.
Any alive cell with more than 3 alive neighbors must also die.
Any empty cell with exactly 3 alive neighbors will become an alive cell.
Using Skript, i coded these 3 rules into 2 functions, and with a little bit of work here and there got the exact same result given by the Game of Life. I included a video and the code for the functions below.
function neighbors1(l: location) :: boolean:
return true if (size of (all blocks in radius 1.5 of {_l} where [input = black concrete])) != 2 or 3
function neighbors2(l: location) :: boolean:
return true if (size of (all blocks in radius 1.5 of {_l} where [input = black concrete])) = 3
Minecraft 1.16.5 - Multiplayer (3rd-party Server) 2021-05-30 14-29-16_Trim.mp4
P.S., Floofsy = I think we can all agree?