Cliff Programmer

Hangman-style browser game for guessing programming concepts. Guess letters to reveal a hidden term. Correct guesses restore a life; wrong ones cost one. You can also guess the full word at any time.

Originally built as a terminal + Turtle graphics game for a hackathon in Vienna (2025), ported to Shiny for Python for this portfolio.

Live Demo

OOP Design

Class Pattern Responsibility
Difficulty Enum Classifies concepts as Easy / Medium / Hard by letter count
GameConfig Frozen dataclass Immutable configuration (max lives)
GameState Frozen dataclass Immutable game snapshot; display_word, is_won, is_over as computed properties
GuessResult Frozen dataclass Pairs a new GameState with a feedback message and status
ConceptBank Encapsulation Vocabulary store; filters by Difficulty and returns a random concept
GameEngine Single responsibility Pure guess logic - new_game() and guess() return new states, no mutation
BaseRenderer Abstract Base Class Defines the cliff_art() and lives_bar() interface
EmojiRenderer Inheritance Concrete renderer implementing BaseRenderer with emoji output
UIBuilder Builder Constructs the Shiny page layout; no game logic
CliffProgrammerApp Composition + DI Receives GameConfig, concepts, and a BaseRenderer; wires reactive server

Running Locally

uv sync
uv run shiny run shiny/app.py