Jump to content

Game of Life


Death_Source

Recommended Posts

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:

  1. Any alive cell with less than 2 alive neighbors must die.
  2. Any alive cell with more than 3 alive neighbors must also die.
  3. 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

P.S., Floofsy = 🤡 I think we can all agree?

  • Like 2
Link to comment
Share on other sites

lol that looks cool for some reason. Try it again but with more starting blocks. 

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

3 hours ago, Death_Source said:

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:

  1. Any alive cell with less than 2 alive neighbors must die.
  2. Any alive cell with more than 3 alive neighbors must also die.
  3. 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

 

P.S., Floofsy = 🤡 I think we can all agree?

This looks cooler than the ice cubes I stored in my basement. 🧊

Hello there! If you're reading this, hope you're having a wonderful day!

 

Feel free to contact me via Discord (CoolProgrammer#1920) for any help.

My DMs are always open for help.

You can also message via. forum messages for help.

1604908226_ScreenShot2021-01-28at10_32_28AM.png.2646ad6be239a9d0756a99e8e15602ab.png

Also, don't hesitate to leave a like on my post if I helped you in any way.

Link to comment
Share on other sites

On 5/30/2021 at 6:47 PM, Death_Source said:

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:

  1. Any alive cell with less than 2 alive neighbors must die.
  2. Any alive cell with more than 3 alive neighbors must also die.
  3. 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

 

P.S., Floofsy = 🤡 I think we can all agree?

Is this a server? Please tell me this is a server

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Lifestealed | Minecraft Servers
 

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - Present

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...