Seed7 - The extensible programming language
Seed7 FAQ Manual Screenshots Examples Libraries Algorithms Download Links
Screenshots Panic Mandelbr Planets Comanche Calc7 Savehd7 Compiler Dnafight Sudoku Wator Tar7 Sydir7 Ftp7 Castle Tetris Make7 Ftpserv Basic Pairs Shisen Eliza Toutf8 Lander Wiz Startrek Mahjong
Mahjong Source Code
 previous   up   next 

This is a Mahjong solitaire game.

The 144 Mahjong tiles are arranged in the turtle formation with their faces upwards. In every turn the player selects two equivalent tiles and removes them. Tiles can be selected when they can be moved left or right without disturbing other tiles. Two tiles are equivalent when their faces have identical pictures or when they are both flower or season tiles. The goal is to remove all tiles. In the upper right corner the number of tiles left and the number of possible moves are displayed. This mahjong program generates only solvable games. Depending on you strategy you still may end in a situation with no possible moves. The following commands are accepted:

  • Help suggests a move. When one tile is already selected, it shows possible moves with matching tiles. When nothing is selected, it shows two tiles of a possible move. Repeated Help commands show all possible moves.
  • Undo a move. There is no limit how many moves can be undone.
  • Redo a move which was undone. There is no limit how many moves can be redone.
  • Demo shows a possible solution.
  • New generates a new game.
  • Quit the game.

The commands are also in the top menu and can be selected with the mouse.

Welcome screen

Start of new game

Middle of game

 previous   up   next