Skip to content

muhammadhaseebiqbal-dev/Conways_Game_of_life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Conway's Game of Life - Premium Edition

A beautiful, interactive implementation of Conway's Game of Life with a modern UI, multiple themes, and advanced customization features.

Conway's Game of Life HTML5 CSS3 JavaScript

๐ŸŒŸ Features

๐ŸŽจ Premium UI Design

  • Modern, responsive design with smooth animations
  • Multiple themes: Default, Dark, Neon, and Ocean
  • Professional typography using Inter font family
  • Glassmorphism effects and elegant shadows
  • Mobile-friendly responsive layout

๐ŸŽฎ Game Features

  • Interactive grid with click-to-toggle cells
  • Real-time statistics (generation count, alive cells, speed)
  • Adjustable grid sizes (10x10 to 30x30)
  • Variable animation speed (50ms to 1000ms)
  • Pre-built patterns (Glider, Blinker, Toad, Beacon)
  • Random pattern generator

๐Ÿ› ๏ธ Controls

  • Play/Pause functionality
  • Reset to clear the grid
  • Random pattern generation
  • Speed control with real-time adjustment
  • Grid size selection
  • Theme switching with live preview

๐Ÿš€ Quick Start

Prerequisites

  • A modern web browser (Chrome, Firefox, Safari, Edge)
  • No additional software required

Installation

  1. Clone or download this repository
  2. Open index.html in your web browser
  3. Start playing immediately!
# If using git
git clone https://github.com/HaseebIqbal1199/Conways_Game_of_life.git
cd "Convoy Game Of Life"

# Open in browser
start index.html  # Windows
open index.html   # macOS

๐ŸŽฏ How to Use

Basic Gameplay

  1. Click cells on the grid to make them alive (they'll turn colored)
  2. Press Play to start the simulation
  3. Watch as the cells evolve according to Conway's rules
  4. Pause anytime to examine the current state
  5. Reset to clear the grid and start over

Customization Options

๐ŸŽจ Themes

Choose from four beautiful themes:

  • Default: Clean, professional white theme
  • Dark: Elegant dark mode with blue accents
  • Neon: Cyberpunk-inspired green glow effects
  • Ocean: Calming blue oceanic theme

๐Ÿ“ Grid Settings

  • Size: Select from 10x10 up to 30x30 cells
  • Speed: Adjust animation from 50ms (fast) to 1000ms (slow)

๐Ÿงฌ Patterns

Pre-built patterns to get you started:

  • Glider: A moving pattern that travels across the grid
  • Blinker: Simple oscillating pattern
  • Toad: Another oscillating pattern with period 2
  • Beacon: A stable oscillating pattern

๐Ÿง  Conway's Game of Life Rules

The Game of Life follows four simple rules:

  1. Birth: A dead cell with exactly 3 live neighbors becomes alive
  2. Survival: A live cell with 2 or 3 live neighbors stays alive
  3. Underpopulation: A live cell with fewer than 2 neighbors dies
  4. Overpopulation: A live cell with more than 3 neighbors dies

These simple rules create complex, emergent behaviors and patterns!

๐Ÿ—๏ธ Project Structure

Conway Game Of Life/
โ”œโ”€โ”€ index.html              # Main HTML file
โ”œโ”€โ”€ README.md               # This file
โ””โ”€โ”€ dir/
    โ”œโ”€โ”€ css/
    โ”‚   โ””โ”€โ”€ style.css       # Premium styling and themes
    โ””โ”€โ”€ js/
        โ”œโ”€โ”€ script.js       # Enhanced JavaScript with UI controls
        โ”œโ”€โ”€ script.js.backup # Backup of enhanced version
        โ””โ”€โ”€ script.js.old   # Original game logic

๐ŸŽจ Themes Preview

Default Theme

Clean, professional design with blue accents and white background.

Dark Theme

Sophisticated dark mode with subtle blue highlights perfect for extended use.

Neon Theme

Cyberpunk-inspired design with bright green glowing effects and animations.

Ocean Theme

Calming blue gradient theme reminiscent of ocean depths.

๐Ÿ”ง Technical Details

Technologies Used

  • HTML5: Semantic markup and structure
  • CSS3: Advanced styling with CSS Grid, Flexbox, and custom properties
  • Vanilla JavaScript: Pure JavaScript without external dependencies
  • Font Awesome: Icon library for UI elements
  • Google Fonts: Inter font family for typography

Key Features Implementation

  • Responsive Design: CSS Grid and Flexbox for layout
  • Theme System: CSS custom properties for easy theme switching
  • Smooth Animations: CSS transitions and keyframe animations
  • Modular JavaScript: Clean separation of game logic and UI controls

๐ŸŽฎ Keyboard Shortcuts

Key Action
Spacebar Play/Pause toggle
R Reset grid
Escape Pause game

๐ŸŒŸ Advanced Features

Statistics Tracking

  • Generation Counter: Shows current evolution generation
  • Alive Cells: Real-time count of living cells
  • Speed Indicator: Current animation speed display

Visual Enhancements

  • Hover Effects: Cells scale and glow on mouse hover
  • Smooth Transitions: Fluid animations between states
  • Visual Feedback: Clear indication of active cells
  • Loading States: Elegant loading animations

๐Ÿค Contributing

Contributions are welcome! Here are some ways you can help:

  1. Report bugs or suggest features
  2. Improve documentation
  3. Add new themes or patterns
  4. Optimize performance
  5. Enhance accessibility

Development Setup

  1. Fork the repository
  2. Make your changes
  3. Test in multiple browsers
  4. Submit a pull request

๐Ÿ“ License

This project is open source and available under the MIT License.

๐Ÿ‘จโ€๐Ÿ’ป Author

Created with โค๏ธ by Muhammad Haseeb

๐Ÿ™ Acknowledgments

  • John Conway for creating the Game of Life
  • Inter Font for beautiful typography
  • Font Awesome for the icon set
  • The open source community for inspiration

Enjoy exploring the fascinating world of cellular automata! ๐ŸŒŸ

Made with passion for the beauty of emergent complexity.

About

A beautiful, interactive implementation of Conway's Game of Life with a modern UI, multiple themes, and advanced customization features.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors