How skyler-ferrante/ncurses-pong works
Main Components
a) Core Components:
• Input Handler (Terminal Input)
• Game Engine
• Renderer (ncurses)
• Game State Manager
• Game Loop Controller
b) Game Elements:
• Player Paddles
• Ball
• Score System
• Screen Boundaries
[User Input] → [Input Handler] → [Game Loop Controller]
• ↕
[ncurses Library] ← [Renderer] ← [Game Engine] → [Game State Manager]
• ↓
• [Game Objects (Ball/Paddles)]
Component Details
Input Handler:
• Terminal key capture
• Input processing for both players
• Practice mode input handling
Game Engine:
• Physics calculations
• Collision detection
• Score management
• Game rules implementation
Renderer:
• ncurses screen management
• Character-based graphics rendering
• Screen refresh logic
Game State Manager:
• Player positions
• Ball position and velocity
• Score tracking
• Game mode state (2-player vs practice)
Additional Elements
• Version information and build requirements
• Make/build process flow
• Configuration options (-p, -number arguments)