Skip to content

SleepyDeb/GameOfLife.SmartScreen

Repository files navigation

Conway's Game of Life for Turing Smart Screen

.NET License

A mesmerizing implementation of Conway's Game of Life optimized for Turing Smart Screens.

Game of Life Demo Animation

Features

  • 🎮 Classic Conway's Game of Life rules
  • 🎨 Customizable color schemes (both hex and named colors)
  • 🔄 Automatic pattern regeneration when stabilization occurs
  • ⚙️ Extensive configuration options via command line
  • 🔌 Automatic serial port detection
  • 💡 Adjustable brightness and cell sizing
  • 🛠️ Fail-safe restart mechanism for hardware glitches

Hardware Requirements

  • Turing Smart Screen (Revision A, B, C, or E)
  • USB connection to host computer
  • .NET 9.0 Runtime

Installation

  1. Clone the repository:
git clone git@github.com:SleepyDeb/GameOfLife.SmartScreen.git
cd GameOfLife.SmartScreen
  1. Build the application:
dotnet build
  1. Run with default settings (auto-detects port):
dotnet run --project GameOfLife.SmartScreen.csproj

Usage

Basic Command

dotnet run --project GameOfLife.SmartScreen.csproj -- -p COM6 -t RevisionA

Full Configuration Example

dotnet run --project GameOfLife.SmartScreen.csproj -- \
    -p /dev/ttyUSB0 \
    -t RevisionB \
    --density 0.15 \
    --background "#2E0854" \
    --alive Gold \
    --dead MidnightBlue \
    --cell 8 \
    --border 1 \
    --luminosity 85 \
    --seed 42

Command Line Options

Short Long Description Default
-p --port Serial port name Auto-detected
-t --type Screen type (RevisionA-E) RevisionA
-d --density Initial live cell probability 0.10
-s --seed Random seed number 1
-b --background Background color (name/hex) MediumVioletRed
-a --alive Alive cell color (name/hex) White
-d --dead Dead cell color (name/hex) Black
-c --cell Cell size in pixels 8
-r --border Cell border size 1
-l --luminosity Screen brightness (0-100) 70
--failsafe Enable automatic restart true
`--autorestart Auto-regenerate patterns true

Color Examples

Named Colors

--background DarkSlateGray --alive Lime --dead Navy

Hex Colors

-b "#FF4500" -a "#00FF00" -d "#000080"

Transparent Background

-b "#330000FF"  # 20% opacity blue

Hardware Setup

  1. Connect your Turing Smart Screen via USB
  2. Note the serial port name:
    • Windows: COMx
    • Linux: /dev/ttyUSBx
  3. Verify orientation and cable connection

Troubleshooting

No cells appearing?

  • Try increasing density: --density 0.15
  • Check color contrasts: --background Black --alive White

Screen not responding?

  • Double check the startup message: Attempting connection on port: /dev/ttyUSB0
  • Try different brightness levels: --luminosity 50

Patterns stabilizing too quickly?

  • Use larger grids: --cell 6
  • Enable auto-restart (default: on)

License

MIT License - see LICENSE file for details


Pro Tip: Try different seeds for unique pattern generations! 🌌
--seed $(date +%s) # Use Unix timestamp as seed

Disclamer: No Vibe Coded, the only part AI genereated is this readme file.

About

A simple GameOfLife implementation for the Turing Smart Screen

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages