Shanghai

Shanghai (上海) is a computerized version of Mahjong solitaire, a tile matching game. In Shanghai, the player removes both free tiles of a matching pair until all 144 tiles are gone. The challenge comes from devising a strategy to free up tiles so they can be removed from the stack. After winning a game, different versions present the player with a reward. For example, in many versions, the tiles reveal the three-dimensional blinking eye of a dragon behind the game screen.

The first commercial version of Shanghai was developed by Brodie Lockhart and published by Activision in 1986 for several popular American and European home computers. As its popularity grew it was ported to several different home consoles and hand held gaming systems. Though developed by a number of different companies, Japanese ports were primarily handled by Sunsoft, including a version developed for the arcade in 1988. It should be noted, however, that not all versions were released in all markets. The initial home computer versions were published in the United States and Europe. The Atari 8-bit conversion of the game was released exclusively in Germany, one of the last regions where the platform was still commercially successful. Published by Hudson Soft as a launch title, Shanghai was released for the PC Engine exclusively in Japan. The Famicom version, developed by SunSoft, was also exclusively sold in Japan. The arcade game the SunSoft developed was not marketed outside of Japan.

Introduction
Shanghai is a solitaire matching game that uses a set of tiles rather than cards. The tiles come from the four-player game popular in East Asia known as Mahjong (to which the game is sometimes erroneously referred). The 144 tiles are arranged in a special four-layer pattern with their faces upwards. A tile is said to be open or exposed if it can be moved either left or right without disturbing other tiles. The goal is to match open pairs of identical tiles and remove them from the board, exposing the tiles under them for play. The game is finished when all pairs of tiles have been removed from the board or when there are no exposed pairs remaining.

Tiles that are below other tiles cannot be seen. Sometimes, tiles are only partially covered by other tiles, and the extent to which such tiles can be distinguished depends on the actual tile set. Using the default layout of 'the turtle', it is not possible to solve every game. Roughly 3% of all games cannot be solved even if peeking is considered. Players should open up new tiles with every pair they eliminate. Choosing obvious pairs from the top levels will often end the game prematurely (i.e. lose) by leaving essential tiles under cover.

Some versions of Shanghai allow the player to change the tile set and patterns from the traditional tiles to flowers, jewels or other items that may be easier to match up at a glance. Some versions offer a time limit, including the arcade game in which a time limit is imposed. They also offer hints/cheat options such as the ability to have a match found for the player or to backtrack and undo already made moves. Additionally, most implementations of the game arrange the tiles in such a way that the game is solvable in at least one way. Sequel revisions of the game allow player to try a series of different layouts with varying levels of difficulty (usually given Chinese names such as 'the ox' or 'the snake')

Gameplay
The object of the Mahjong solitaire board game is to match and remove alike tiles and get rid of the entire stack of five layers. To removing a tile it must be: In most variations, the order of operations to remove tiles is to: If you decide to cancel or change the first tile that you selected, you must unhighlight the original tile by pointing to it and pressing the button a second time.
 * Free: No other tile is lying above or is partially covering it and no other tile is lying to the left and to the right of it. In other words, one side must be free for the tile to be removed.
 * Pairs: One must remove the tiles in pairs. Two tiles are identical if they possess the same face pattern. Other pairs include flower and season tiles. Any of these tiles can be matched up with another.
 * 1) Point to the first tile of the desired pair and press the button to highlight it.
 * 2) Point to the second tile of the desired pair and press the button to highlight it.
 * 3) When you are sure that you would like to remove the highlighted pair of tiles, press the button a third time.

Tiles


A Mahjong set consists of 144 tiles. These are split into the following seven groups (a.k.a. sets):
 * 1) Ball tiles. 🀙🀚🀛🀜🀝🀞🀟🀠🀡 There are nine of them. Each appears four times.
 * 2) Bamboo tiles. 🀐🀒🀑🀓🀔🀕🀖🀗🀘 There are nine of them. Each appears four times. Notice that the "One of the Bamboo" tile is drawn like a peacock.
 * 3) Character tiles. 🀇🀈🀉🀊🀋🀌🀍🀎🀏 They are drawn as containing two Chinese characters, where the upper one indicating the number is in black, and the lower one in red. There are nine of them, each of which appears four times.
 * 4) Wind tiles. 🀀🀁🀂🀃 There are four wind tiles: East, South, West and North represented as their Chinese characters. Each of them appears four times.
 * 5) Dragon tiles. 🀅🀆🀄 There are three dragon tiles: Green Dragon, White Dragon and Red dragon. They are drawn as Chinese characters in this game. Each of them appears four times.
 * 6) Season tiles. 🀦🀧🀨🀩 There are four tiles, each representing a season of spring, summer, autumn or winter. Each of them appears only once, and any of them can match with another.
 * 7) Flower tiles. 🀣🀢🀤🀥 There are four tiles, each representing one of the following: ORC (Orchid), PLM (Plum), BAM (Bamboo) and MUM (Chrysanthemum). Each of them appears only once, and any of them can match with another.

These tiles may be hard to distinguish.

The "Level" at the bottom of the screen shows you the height of the tiles, as the game is only two-dimensional. It is recommended to learn this early, as it is easy to forget that the lower, inside tiles are actually higher and free to remove.

Strategy Tips

 * When removing a pair, an identical pair exists in the layout. Check if the other pair has any problem being removed later or one of the tiles you want to remove now should rather be used with another of its kind.
 * Long rows and tall stacks are hardest to remove and block the most tiles. Work on those first but still keep the other strategies in mind when doing so. Plan ahead to see which areas might have problems and which tiles need special attention, so you do not remove a pair and get stranded with one you cannot remove.
 * If all of a kind can be removed, do so straight away to clear space. An emptier board is much easier on the eye and mind and after all, the objective is to remove all tiles anyway.
 * Using the hints shows you one possibility, not the best one. Following this advice might lead into a dead end.
 * If you have the choice between 3 tiles, keep the one that is least affecting the rest of tiles. In other words remove the one that frees up the most tiles.

Game Modes

 * Solitaire: 1-Player. Remove all tiles without a time limit.
 * Tournament: 1-Player. You get 1 point for each tile removed. Go through several puzzles with or without a time limit. Choose 5, 10 or 20 minutes to complete as many sets as you can.
 * Challenge: 2-Player. In this mode you have time-limited turns. Choose between 10, 20, 30, 60 seconds per turn. Player 1 starts. Inevitably, some turns will result in a match being removed and some won't. At the end (when the layout is clear or unwinnable) the player with the biggest score wins.

Common options
While the game play is the same between each version of the game, the available options differ from one release to the next. Below is a list of common options that are typically present throughout the majority of releases. Interestingly, if the game is in Japanese, most selections are English commands written in Katakana, as opposed to fully translated Japanese commands.

Release history
The computer version of Mahjong solitaire was originally created by Brodie Lockard in 1981 on the PLATO system and named Mah-Jongg after the game that uses the same tiles for play. Lockard claims that it was based on a centuries-old Chinese game called "the Turtle". It was not until Activision released Shanghai in 1986 for the Macintosh and Apple IIgs that the game gathered momentum. This version was also created by Brodie Lockard (programming and graphics) with Brad Fregger as the producer. The game became very successful, and around 10 million copies were sold. It has been ported to many different platforms. The name "Shanghai" was trademarked by Activision.

A majority of the releases published by Activision use the same box artwork, as depicted above. It's interesting to note that this artwork depicts two people playing the game, despite the fact that the game is intended to be a solitary experience. A few releases, particular those released in Japan, present variations of, or entirely different artwork from, the original production.