Gobang

Panda Tom lives in the forest with his brothers in the wilds of the Amazon.
Our pandas love to have fun and often play various games.
Today in the game Gobang, we will be solving a rather interesting puzzle with them.
Before you on the screen will be visible balls.
Some of them will be white and some will be black.
In one move, you can move one ball in any direction.
Your task is to put the same color balls in a row of five objects.
As soon as you form such a line you will be given points, and the balls will disappear from the screen.
The level will be held when you completely clear the playing field.