项目作者: lifengli

项目描述 :
basic card games in Javascript
高级语言: JavaScript
项目地址: git://github.com/lifengli/game.git
创建时间: 2018-08-24T03:00:34Z
项目社区:https://github.com/lifengli/game

开源协议:

下载


Card Game: War

sample card game with a basic UI

Dependency
license
Maintenance
Pull

Game Play Mechanics

https://www.bicyclecards.com/how-to-play/war/

The goal is to be the first player to win all 52 cards

THE DEAL

The deck is divided evenly, with each player receiving 26 cards, dealt one at a time, face down. Anyone may deal first. Each player places his stack of cards face down, in front of him.

THE PLAY

Each player turns up a card at the same time and the player with the higher card takes both cards and puts them, face down, on the bottom of his stack.

If the cards are the same rank, it is War. Each player turns up one card face down and one card face up. The player with the higher cards takes both piles (six cards). If the turned-up cards are again the same rank, each player places another card face down and turns another card face up. The player with the higher card takes all 10 cards, and so on.

HOW TO KEEP SCORE

The game ends when one player has won all the cards.

Number 1 represents Ace, which is the largest card.

Basically, the cards that each player puts down go into the pot, and whoever wins the hand takes the pot. A player wins the game when they have all of the other player’s cards.