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

Javascript implementation of the classic hand game named Chopsticks

Home Page:http://ian-s-mcb.github.io/chopsticks-hand-game-js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

http://ian-s-mcb.github.io/chopsticks-hand-game-js/


Languages

Language:JavaScript 64.9%Language:HTML 25.3%Language:CSS 9.9%