Question: CODE IN JAVA. JavaFX and program state Implement a GUI and gameplay for a very popular two-player game, Connect Four. Each of the players has

CODE IN JAVA.

JavaFX and program state

Implement a GUI and gameplay for a very popular two-player game, Connect Four. Each of the players has either black or red colored discs that he/she will drop down into 7 column by 6 row grid. The initial discs will go to the bottom. A disc may only be placed either onto the bottom or on top of another disc (of either color.) The game continues until one of the players gets four in a row, or until the board fills up and there is no winner.

You will have to keep track of various program state data and game mechanics, such as:

Whose turn it is

Is a particular move valid? Remember a disc must have either the bottom of the game board below it, or another disc below it.

After each move, check to see if there is a winner. A player can win with four discs arranged in any of the following ways: vertically (up and down) horizontally (left and right) diagonally (at an angle down and to the right or down and to the left). Or If the game board is full or not.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!