Fix(Convoys_GameofLife): Fix Windows curses crash, screen bounds error, add presets & ANSI fallback (#529) - #530
Open
Prayas340 wants to merge 1 commit into
Conversation
…r, add presets & ANSI fallback (ndleah#529) - Decouple simulation logic into testable GameOfLifeEngine - Add safe coordinate rendering with safe_addstr() to prevent curses boundary errors - Implement ANSI terminal fallback mode for running without curses - Add pattern presets (Glider, Pulsar, Gosper Gun, Blinker, Beacon, Toad) - Add interactive controls: Pause, Step, Randomize, Clear, Wrap toggle, Speed - Add CLI argument parsing with argparse - Add unit test suite in test_game_of_life.py and requirements.txt - Update README.md with complete documentation and keybindings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This Pull Request refactors and improves the Conway's Game of Life simulation (
Convoys_GameofLife):GameOfLifeEngine.cursesis not present by adding an ANSI terminal fallback mode as well aswindows-cursesdocumentation inrequirements.txt.safe_addstr()to preventcurses.error: addstr() returned ERRwhen the terminal is resized or when rendering near boundaries.pausevariable, adding interactive controls for Pause/Resume (Space/p), Single-Step (n), Randomize (r), Clear (c), Wrap toggle (w), and Speed adjustment (f/s).1-5keys or--presetflag).--cli,--preset,--speed,--rows,--cols,--steps,--no-wrap).test_game_of_life.py(9/9 tests passing).requirements.txtand updatesREADME.mdwith complete documentation.Fixes #529
Type of change
Project
Your Project Name: Convoys_GameofLife
Short Description: Terminal simulation of Conway's Game of Life with curses UI, ANSI terminal fallback, and pattern presets.
Checklist:
README.md, according to the givenREADME_TEMPLATE.test_game_of_life.py.requirements.txt.