Skip to content

Terminal card game written in Java (Fisher–Yates shuffle algorithm)

Notifications You must be signed in to change notification settings

msochan/CardGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Card game - War

Game rules

Each card shows a number from 1 to 10. Each player receives a stack of 20 cards from the shuffled deck as their draw pile. The draw pile is kept face-down in front of the player. Each player also keeps a discard pile.

Each turn, both players draw the top card. If there are no more cards in the draw pile, shuffle the discard pile and use those cards as the new draw pile. Once a player has no cards in either their draw or discard pile, that player loses.

The players present their drawn card and compare the values. The player with the higher value card, takes both cards and adds them to their discard pile, next to the draw pile. If the cards show the same value, the winner of the next turn wins these cards as well.

  1. When comparing two cards, the higher card should win.
  2. When comparing two cards of the same value, the winner of the next round should win 4 cards.

How to play?

Press enter to see the output of next round! :)

About

Terminal card game written in Java (Fisher–Yates shuffle algorithm)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages