Skip to content

NikitaSutulov/GameOfLife

Repository files navigation

GameOfLife

This is my version of a world-famous game "Conway's game of life" made from scratch. The rules of the game are pretty simple:

The universe of the Game of Life is an infinite, two-dimensional orthogonal grid of square cells, each of which is in one of two possible states, live or dead (or populated and unpopulated, respectively). Every cell interacts with its eight neighbours, which are the cells that are horizontally, vertically, or diagonally adjacent. At each step in time, the following transitions occur:

Any live cell with fewer than two live neighbours dies, as if by underpopulation. Any live cell with two or three live neighbours lives on to the next generation. Any live cell with more than three live neighbours dies, as if by overpopulation. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction. These rules, which compare the behavior of the automaton to real life, can be condensed into the following:

Any live cell with two or three live neighbours survives. Any dead cell with three live neighbours becomes a live cell. All other live cells die in the next generation. Similarly, all other dead cells stay dead.

The game elements are usually called "cells", but I will call them "tiles".

My realization includes three different game field sizes: with small, medium and large-sized tiles (see the full pictures to see normal displayment). image image image

Also you can change the game speed and color of the tiles. image Finally, you can pause and reset the game field whenever you want.

I hope that you will enjoy the game!

IMPORTANT How to launch:

  1. clone the repository on your PC;
  2. in command line enter "npx http-server" or "npm run launch";
  3. the game will be on localhost port 8080.

Or you can run it right in the browser! The link is https://nikitasutulov.github.io/GameOfLife/

About

Conway's Game Of Life

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages