Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

36 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿƒ Snap Card Game

A simple 2 player Snap card game built in Java and played in the command line.

Players take turns drawing cards. If two consecutive cards share the same symbols (e.g. two Kings or two 7s), the current player must type 'snap' within 2 seconds to win.

๐ŸŽฎ How to Play

  1. Run the program.
  2. Choose to view instructions or start the game.
  3. Enter both players' names.
  4. The game automatically creates and shuffles the deck, then randomly selects who goes first.
  5. Players press ENTER to draw cards.
  6. If two consecutive cards match:
    • Type 'snap' within 2 seconds to earn 1 point.
    • Incorrect or late responses result in no points.
  7. The player earns 1 point for each correct Snap, and the highest score wins.
  8. f the deck runs out without a match, the round ends in a draw.
  9. After each game, enter 'y' to play again or 'n' to exit.

๐Ÿš€ Getting Started

  1. Visit: https://github.com/annalin2000/snap-game
  2. Click the <> Code button.
  3. Select your preferred method (HTTPS, SSH, or GitHub CLI).
  4. Copy the repository URL.
  5. Open Terminal and navigate to your desired directory.
  6. Run:
git clone <repository URL>
  1. Move into the project folder:
cd snap-game
  1. Compile the program:
javac -d out src/main/Main.java
  1. Run the game:
java -cp out main.Main

Follow the on screen prompts to begin playing.

๐Ÿค Contributing

  1. Fork the repository:
  2. Clone your fork:
git clone https://github.com/<your-username>/snap-game.git
cd snap-game
  1. Create a Branch
git checkout -b feature/your-feature-name
  1. Commit and push your changes
git add .
git commit -m "Clear description of your change"
git push origin feature/your-feature-name
  1. Open Pull Request
    • Go to your fork on GitHub and click Compare & Pull Request.
    • Explain clearly what you changed and why.

๐Ÿ’ฌ Feedback

If you enjoyed the game or have suggestions for improvement, feel free to open an issue or submit a pull request.

Thanks for playing!

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages