The goal of the game is to remove as many balls as possible by forming lines. You can do so vertically, horizontally and by diagonal using the balls of the same color only.
There's a square field 9x9 shown on the screen. Program randomly places 3 balls of a different color. There are 7 possible colors. One move lets you shift one ball by highlighting it and indicating new dislocation. In order to make a move you have to ensure that there's a way from free squares between initial and final square. The aim is in removal of maximum quantity of balls which get disappeared if there's a line of 5 or more balls of the same color. You can do so horizontally, vertically and bias. When you get a line removed, 3 new balls don't appear. Otherwise each ne move is accompanied by the appearance of 3 new balls.
You also get in-game tip so you can see the color and the squares where they will appear. It will make it easier to think about future move and the whole game strategy.
If the line from 5 or more balls is formed after the arrival of new ball, this line still will be removed and you'll get scores.
So the point is to get a highest possible score.