The game of Connect-four is played by two players on a board with 42 positions laid out in 6 rows by 7 columns. A move of the game consists of occupying a position. The two players alternately move. A player occupies a position by click mouse onto the lowest empty position of that column and occupies it. The player that first occupies four adjacent positions in a vertical, horizontal, or diagonal line wins the game.
If all the positions of the board are occupied and no player wins, the game terminates as a draw. Before a game restarts, six positions of the board can be occupied by a "random filler". The filler do not belong to any player. By randomly choosing these positions, a different game can be played every time.
The color of a Position's cirle indicates the state of the correstonding board position.The color coding is as follows:
black: empty red: occupied by the first player yellow: occupied by the second player blue: occupied by the random filler
If the position is empty and can be occipied, then it changes color to capture the user's attertion. The color it changes to is a darker shade of the color of the moving player. If the player clicks the mouse, the positon becomes occupied by that player and changes to that player's color.
If the game terminates with a winner, four Positions that belong to a winning group are drawn with a cross symbol to indicate the winner's positions.