PSGameOfLife is a PowerShell module written in F#. It runs Conway's Game of Life interactively in your console.
Tested on PowerShell 7.4 or later with Windows Terminal on both Windows and Ubuntu. Visual Studio Code terminal appears to have a higher load than Windows Terminal.
- Interactive Conway's Game of Life simulation in the terminal
- Customizable initial randomness and update interval
- Simple PowerShell cmdlet interface
- CUI and GUI, GUI mode is Avalonia-based cross-platform
You can install PSGameOfLife from the PowerShell Gallery:
# Recommended: PSResourceGet (PowerShellGet 3.0)
Install-PSResource -Name PSGameOfLife
# Or, with PowerShellGet 2.x:
Install-Module -Name PSGameOfLifeSee the Start-GameOfLife.md file for detailed cmdlet help.
Start-GameOfLifePress Q during the simulation to quit.
You can customize the initial randomness and update interval:
Start-GameOfLife -FateRoll 0.2 -IntervalMs 200-FateRollsets the probability (0.1 ~ 0.5) that each cell is alive at the start-IntervalMssets the interval in milliseconds between generations (default: 100)
Start-GameOfLife -GuiModePress Q during the simulation to quit.
Note
On Linux, due to a known issue, quitting the game with the Q key leaves a zombie window. Therefore, the Q key is not provided on Linux. Please close the window to exit.
You can adjust the appearance and size of the window with the following parameters:
-CellSizesets pixel size of each cell (1 to 10, default: 10)-Width: sets number of cells horizontally (default: 50)-Height: sets number of cells vertically (default: 50)
Example:
Start-GameOfLife -GuiMode -CellSize 8 -Width 80 -Height 60You can use -FateRoll and -IntervalMs in GUI mode as well as in CUI mode.
Start-GameOfLife -GuiMode -CellSize 8 -Width 80 -Height 60 -FateRoll 0.2 -IntervalMs 200The MIT License applies to this project. For details, see the LICENSE file.

