Skip to content

React Native and Expo implementation of Conway's Game of Life. With a 20x20 grid where users can set the initial state of cells and observe their evolution based on predefined rules. Users can start, pause, reset, and randomize the simulation.

License

Notifications You must be signed in to change notification settings

Lazar4o/Game-of-Life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Game of Life

A simple implementation of Conway's Game of Life using React Native and Expo. This app allows users to interact with a grid of cells, applying the rules of Conway's Game of Life to simulate cellular automata.

runs with Expo Go

Recommended IDE Setup

VSCode + TypeScript for development.

Prerequisites

Before you start, make sure you have the following installed:

  • Node.js
  • Expo Go app on your mobile device for running the app locally

Project Setup

  1. Clone the repository:
git clone https://github.com/Lazar4o/Game-of-Life.git
cd Game-Of-Life
  1. Install dependencies:
npm install
  1. Start the development server:
npx expo start --clear
  1. Scan the QR code with Expo Go:
  • Open the Expo Go app on your mobile device and scan the QR code provided in the terminal to run the app on your device.

Usage

The Game of Life app allows you to:

  • Interact with a 20x20 grid of cells.
  • Toggle cell states between alive and dead before starting the simulation.
  • Start, pause, and reset the simulation.
  • (BONUS) Randomize the initial state of the grid.

Rules of the Game of Life:

  1. Any live cell with fewer than two live neighbors dies (underpopulation).
  2. Any live cell with two or three live neighbors lives on to the next generation.
  3. Any live cell with more than three live neighbors dies (overpopulation).
  4. Any dead cell with exactly three live neighbors becomes a live cell (reproduction).

Customize Configuration

For more details on configuration, see the Expo Configuration Reference.

Contributing

Contributions are welcome! Please refer to the repository's issues page to discuss potential changes or enhancements.

License

Distributed under the MIT License. See LICENSE file for more information.

Feel free to adjust the content according to the actual features and configurations of your app. This structure helps provide clear setup instructions and comprehensive information about the project in a professional format.

About

React Native and Expo implementation of Conway's Game of Life. With a 20x20 grid where users can set the initial state of cells and observe their evolution based on predefined rules. Users can start, pause, reset, and randomize the simulation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published