https://github.com/hamed-rezaee/flutter_game_of_life
The Game of Life implemented in Flutter.
https://github.com/hamed-rezaee/flutter_game_of_life
cellular-automata conways-game-of-life custom-painter dart flutter game-of-life
Last synced: 23 days ago
JSON representation
The Game of Life implemented in Flutter.
- Host: GitHub
- URL: https://github.com/hamed-rezaee/flutter_game_of_life
- Owner: hamed-rezaee
- License: mit
- Created: 2023-09-15T10:40:01.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-09-28T02:52:23.000Z (about 2 years ago)
- Last Synced: 2025-02-22T21:29:24.588Z (7 months ago)
- Topics: cellular-automata, conways-game-of-life, custom-painter, dart, flutter, game-of-life
- Language: C++
- Homepage:
- Size: 1.16 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Game of Life in Flutter
This is a simple implementation of [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) in Flutter, a cellular automaton simulation. The code includes a custom painter to visualize the game grid and a class to manage logic.

### How to Use
Once the application is running, you will see the Game of Life simulation displayed on the screen. Here's how to interact with it:
- The grid represents the cells in the Game of Life.
- Cells can be in one of two states: alive (red) or dead (black).
- The initial state of the grid is randomized.
- The simulation will automatically update at a predefined interval.### Customization
You can customize the following aspects of the simulation:
**Grid Size:** The grid size can be adjusted by changing the `size` parameter in the `MainApp` widget in `main.dart`. For example, `GameOfLife(85)` creates an 85x85 grid.
**Update Interval:** You can change the update interval by modifying the `Duration` passed to the `GameOfLife` stream in `main.dart`. For example, to increase the update interval to 50 milliseconds, use `Duration(milliseconds: 50)`.
**Cell Appearance:** You can customize the appearance of live and dead cells by modifying the `GameOfLifePainter` class in `game_of_life_painter.dart`. You can change the colors and styles used to paint cells.
### License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.