Morpion solitaire

From Rosetta Code
Revision as of 21:16, 7 June 2011 by rosettacode>MagiMaster (Clarified?)
Morpion solitaire is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.

Play a game of Morpion solitaire. Use the standard version, with 5 point lines that allows parallel lines to touch at the endpoints.

Morpian solitaire is played on a (theoretically) infinite grid. It begins with 36 points marked in a Greek cross:

...XXXX...
...X..X...
...X..X...
XXXX..XXXX
X........X
X........X
XXXX..XXXX
...X..X...
...X..X...
...XXXX...

A move is made by adding one point anywhere that creates a new line of 5 points (without spaces) and drawing a line through them. Moves are usually marked with the number of the move. No two lines can share more than a single point. For this task, playing randomly is acceptable.

Note: The longest know game under these rules is 177 moves. (This isn't thought to be the longest game possible.) The shortest game possible is 20 moves.