Console Based Card Game
Strategic C# console game built using object-oriented programming, AI decision logic, and file logging.
Project Overview
Strategic two-player card game where competitors aim to minimize the difference between their two number cards. Players strategically decide whether to keep their current cards or swap one for a new random card. Features intelligent AI opponent, comprehensive logging, and replay functionality.
Strategic Decision Making
Players analyze card differences and make calculated swap decisions.
Intelligent AI Opponent
Bot uses sophisticated decision logic for optimal gameplay.
Complete Logging System
Automatic session logging with timestamps for analysis and debugging.
Core Features
Sophisticated gameplay mechanics and robust software architecture
Strategic Gameplay
Players must analyze card differences and make optimal stick/swap decisions.
AI Decision Logic
Intelligent bot analyzes risk/reward and makes strategic card swaps.
OOP Architecture
Classes, inheritance, encapsulation, enums, and modular design patterns.
Logging System
Automatic timestamped log files track every decision and game outcome.
Input Validation
Robust validation prevents invalid inputs and enhances UX.
Replay System
Instant rematch functionality for continuous gameplay sessions.
Game Workflow
Complete gameplay cycle from initialization to replay
Game Initialization
Welcome screen and player name input
Random Cards
Generate initial card pairs for both players
Player Decision
Choose Stick or Swap with strategic analysis
AI Bot Move
Bot analyzes and executes optimal decision
Round Results
Calculate differences and display scores
Game Complete
Announce winner with tie-breaker logic
Log Generated
Save complete session to timestamped file
Replay Prompt
Offer instant rematch option
Console Experience
Clean console interface with strategic gameplay displays
Welcome Screen
Game initialization and player setup
Player Turn
Strategic decision making interface
Bot Decision
AI strategic analysis and execution
Final Results
Victory screen with scoring summary
Game Log
Comprehensive session logging output
Replay Prompt
Seamless rematch functionality
AI Bot Intelligence
Sophisticated decision-making algorithms for competitive gameplay
Risk Analysis
Bot calculates current difference vs potential swap outcomes before deciding.
Strategic Swapping
Prioritizes swapping higher-value cards when difference exceeds threshold.
Tie-Breaker Awareness
Considers total card values for tie-breaker scenarios in decision logic.
Conservative Play
Avoids unnecessary swaps when current difference is already optimal.
Advanced Logging System
Professional-grade session tracking and debugging capabilities
Automatic File Creation
Each session creates timestamped log: GameSession_2024-01-15_143210.log
Complete Tracking
Logs every swap, round result, player decisions, and final winner determination.
Debugging Ready
Structured format enables easy analysis, testing, and performance review.
Tech Stack
Modern C# console application architecture
Interested in Custom Software?
Looking for game development, AI logic systems, or console applications?