Shanghai is a rummy card game played with three to eight players. Shanghai's rules are based on gin rummy. It goes by many other names including California rummy, Liverpool rummy and contract rummy.
A game of Shanghai rummy begins by shuffling one or more 52-card decks. Up to four players can play with two decks. A game with five or more players requires three decks. The dealer is randomly chosen and deals the cards to all the players. The cards are dealt a total of seven times for seven rounds of play.
The object of the game is for players to organize all their cards into melds. Melds are sets or sequences arranged by rank or value. Melds typically consist of three cards, but sometimes include more. Play ends once a player has arranged all his cards into melds. This is referred to as "going out" because the player has played the last card in his hand.
The cards of the remaining players are added up for scoring. Wild cards and aces are worth 15 points, face cards are worth 10 and other cards are worth pip value. The player who has gone out receives a score of zero. The scores are tallied at the end of each round, and once seven rounds have been completed, the player with the lowest overall score wins.