Short tutorial:
Linez/Lines is a puzzle game that is played on a 9x9 field. Each turn three new tiles, chosen out of seven possible colors, are added to random field squares. The tiles are labeled with the letters A, B, C, D, E, F, and G for better readability if the player is colorblind. The goal is to survive as long as possible, by removing figures of tiles of the same color. The specific form of the figure is a vertical, horizontal or diagonal line of minimum 5 tiles. In order to assemble the figure, the player can move one tile per turn, if there is a path (set of adjacent empty cells) between the current and the destination squares.
Player earns points for each complete figure as follows:
5 tiles - 10 points
6 tiles - 13 points
7 tiles - 17 points
8 tiles - 22 points
9 tiles - 28 points
The formula is (n - 5) n / 2 + 10 points.
After the move, when a figure of tiles is formed and disappears, the system does not add three new tiles as a bonus.
Sometimes, when the system adds three new tiles, a line may be formed and it disappears. In such cases, the player still gets the points for the removed tiles.
The game allows to undo a single turn once.
Other versions are known as Color Lines, iColor Lines, Lines Classic, Color lines 95, etc.
The script is based on a free game, available at https://github.com/klayman/lines