Skip to content

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Card Game

A simple snap card game built with Java. This project demonstrates the implementation of core object-oriented principles, game mechanics, and logic for a card game.

Features

  • Deck creation and shuffling
  • Player hands and game rounds
  • Basic card game logic
  • Time-out feature

Prerequisites

  • Java 11+
  • Maven (for dependency management)

Setup

  1. Clone the repository:
    git clone https://github.com/J0EYWEB/java-card-game.git
  2. Navigate to the project directory:
    cd java-card-game
  3. Build the project using Maven:
    mvn clean install
  4. Run the game:
    mvn exec:java -Dexec.mainClass="org.example.Main"
    

How to play

  • select which card game you want to play (only snap currently)
  • Enter the names of each player
  • Players take turns pressing enter to draw a card
  • When a card matches the previous one, the play must type 'snap' within 2 seconds.
  • If the player does not type 'snap' within 2 seconds, the opponent wins automatically.
  • if 'snap' is not typed correctly or the enter key is accidentally hit before any characters are typed, the game continues.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages