Skip to content

Commit e5937ba

Browse files
committed
Initial commit: Mojo Game of Life implementation with documentation
0 parents  commit e5937ba

31 files changed

Lines changed: 7068 additions & 0 deletions

.github/workflows/gh-pages.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main # or 'master' if that's your default branch
7+
pull_request:
8+
branches:
9+
- main # or 'master' if that's your default branch
10+
workflow_dispatch: # Allow manual triggers
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow one concurrent deployment
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: true
22+
23+
jobs:
24+
build-and-deploy:
25+
runs-on: ubuntu-latest
26+
environment:
27+
name: github-pages
28+
url: ${{ steps.deployment.outputs.page_url }}
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
33+
- name: Set up Python
34+
uses: actions/setup-python@v4
35+
with:
36+
python-version: '3.10'
37+
cache: 'pip'
38+
39+
- name: Install dependencies
40+
run: |
41+
python -m pip install --upgrade pip
42+
pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-minify-plugin
43+
44+
- name: Build site
45+
run: mkdocs build --strict --verbose --site-dir public
46+
47+
- name: Setup Pages
48+
uses: actions/configure-pages@v3
49+
50+
- name: Upload artifact
51+
uses: actions/upload-pages-artifact@v2
52+
with:
53+
# Upload entire repository
54+
path: 'public'
55+
56+
- name: Deploy to GitHub Pages
57+
id: deployment
58+
uses: actions/deploy-pages@v2
59+
60+
# Add a simple test job to verify the build works
61+
test:
62+
runs-on: ubuntu-latest
63+
needs: build-and-deploy
64+
steps:
65+
- name: Checkout
66+
uses: actions/checkout@v4
67+
68+
- name: Set up Python
69+
uses: actions/setup-python@v4
70+
with:
71+
python-version: '3.10'
72+
73+
74+
- name: Lint Markdown
75+
run: |
76+
pip install markdownlint-cli
77+
markdownlint '**/*.md' --ignore node_modules
78+
79+
- name: Check links
80+
run: |
81+
pip install mkdocs-linkcheck
82+
mkdocs build --strict
83+
mkdocs-linkcheck -c .github/workflows/linkcheck.json
84+
85+
- name: Test build
86+
run: |
87+
pip install mkdocs-material
88+
mkdocs build --strict --verbose
89+
90+
# Add environment configuration for GitHub Pages
91+
deploy:
92+
environment:
93+
name: github-pages
94+
url: ${{ steps.deployment.outputs.page_url }}

.gitignore

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# PyInstaller
28+
*.manifest
29+
*.spec
30+
31+
# Installer logs
32+
pip-log.txt
33+
pip-delete-this-directory.txt
34+
35+
# Unit test / coverage reports
36+
htmlcov/
37+
.tox/
38+
.coverage
39+
.coverage.*
40+
.cache
41+
nosetests.xml
42+
coverage.xml
43+
*.cover
44+
.hypothesis/
45+
.pytest_cache/
46+
47+
# Translations
48+
*.mo
49+
*.pot
50+
51+
# Django stuff:
52+
*.log
53+
local_settings.py
54+
db.sqlite3
55+
56+
# Flask stuff:
57+
instance/
58+
.webassets-cache
59+
60+
# Scrapy stuff:
61+
.scrapy
62+
63+
# Sphinx documentation
64+
docs/_build/
65+
66+
# PyBuilder
67+
target/
68+
69+
# Jupyter Notebook
70+
.ipynb_checkpoints
71+
72+
# IPython
73+
profile_default/
74+
ipython_config.py
75+
76+
# pyenv
77+
.python-version
78+
79+
# Environments
80+
.env
81+
.venv
82+
env/
83+
venv/
84+
ENV/
85+
env.bak/
86+
venv.bak/
87+
88+
# Mojo specific
89+
.mojo_cache/
90+
*.mojopkg
91+
*.mojopkg.lock
92+
93+
# IDE specific files
94+
.idea/
95+
.vscode/
96+
*.swp
97+
*.swo
98+
*~
99+
100+
# Build directory
101+
build/
102+
103+
# Executable
104+
life/game_of_life
105+
106+
# Documentation build
107+
docs/site/
108+
109+
# Local development settings
110+
.local/
111+
112+
# Logs
113+
logs/
114+
*.log

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Changelog
2+
3+
All notable changes to the Mojo Game of Life project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
### Added
10+
- Initial project setup with basic Game of Life implementation
11+
- Support for different initial patterns (random, glider, blinker)
12+
- Interactive controls (pause, step, reset, speed control)
13+
- Command-line arguments for customization
14+
- Comprehensive documentation with MkDocs
15+
- Performance optimization guide
16+
- Configuration options for display and simulation
17+
18+
### Changed
19+
- Improved grid evolution algorithm for better performance
20+
- Enhanced documentation structure
21+
- Updated README with better examples and usage instructions
22+
23+
### Fixed
24+
- Fixed edge case handling in neighbor counting
25+
- Resolved issue with grid wrapping at boundaries
26+
- Fixed memory leaks in grid operations
27+
28+
## [0.1.0] - 2023-06-27
29+
### Added
30+
- Initial release of Mojo Game of Life
31+
- Basic grid implementation with evolution rules
32+
- Simple Pygame-based visualization
33+
- Basic command-line interface

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Your Name
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)