Snap!!
Snap
A classic game of Snap implemented in C++ with Unicode card visualization in the console.
Features
- Play against the computer or another player.
- Three difficulty levels: Easy, Medium, Hard.
- Unicode characters for visually appealing card display.
- Real-time keyboard input for calling “Snap”.
- Animated countdown and clear instructions.
How to Play
- Run the program.
- Choose the number of players (1 or 2).
- If playing against the computer, select a difficulty.
- Take turns playing cards. When two consecutive cards match in value or suit, press your Snap key:
- Player 1:
S - Player 2:
P(in 2-player mode)
- Player 1:
- The fastest player to call “Snap” wins the pile.
- The game ends when a player runs out of cards.
Controls
S: Player 1 calls SnapP: Player 2 calls Snap (2-player mode)
Requirements
- Windows OS (uses Windows-specific console features)
- C++17 or later
Build Instructions
- Open the project in your preferred C++ IDE (e.g., Visual Studio).
- Build all
.cppfiles together:main.cppSnap.cppDeck.cppCard.cpp
- Run the resulting executable.
File Structure
main.cpp- Entry pointSnap.h/Snap.cpp- Game logic and flowDeck.h/Deck.cpp- Deck managementCard.h/Card.cpp- Card representation and displayREADME.md- Project documentation
License
This project is for educational purposes.