Skip to content
This repository has been archived by the owner on Sep 13, 2021. It is now read-only.

ian-s-mcb/chopsticks-hand-game-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chopstick Hand Game JS

About

Never heard of the Chopsticks game? It's a simple, turn-based hand game where two players transfer points, as indicated by the number of extended fingers, from hand to hand.

Game Rules

The game begins with one point per hand, and the game ends when a player loses all their points. The player with no points left loses.

During a turn, a player can either attack or split. Attacking adds the all points from the attacking hand to the attacked hand, but leaves the attacking hand unchanged. Splitting redistributes points between the current player's hands. Each hand is limited to at most four points. When a hand reaches more than four points, that hand is reduced to zero points. A hand with zero points can't be attacked, but can be involved in a split.

Still not clear? Check out this wikipedia article for a full explanation of the game.

Installation

Clone this repo, go to this url, and download zip file inside. Place the zip file within repo and extract the files. Finally, open index.html in browser. (No web sever is needed to the play game.)

Development Notes

This sketch shows the state machine that we used to handle our game logic.

Contributors

About

Javascript implementation of the classic hand game named Chopsticks

Resources

Stars

Watchers

Forks

Packages

No packages published