Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Background According to Wikipedia Connect 4 is, a two-player connection game in which the players first choose a color and then take turns dropping one

Background
According to Wikipedia Connect 4 is, a two-player connection game in which the players first
choose a color and then take turns dropping one colored disc from the top into a seven-column,
six-row vertically suspended grid. The pieces fall straight down, occupying the lowest available
space within the column. The objective of the game is to be the first to form a horizontal,
vertical, or diagonal line of four of one's own discs.
Objectives
By completing this assignment, you will:
Be able to create a JavaFX window.
Be able to create JavaFX GUI objects.
Be able to create JavaFX layout managers.
Learn how to create a simple two player game.
Assignment
This week, you will work to create a simple two player version of Connect 4. Your game should
be able to determine a winner or if the game results in a tie. You must also have a button that
will reset the game so it can be played again.
Implementation
Write a program that will let two users sitting right next to each other play a game of Connect 4
that meets the following criterion:
The game should be able to be reset so it can be played multiple times.
The game ends when one person has won or there is a tie.
The winner should be printed to the command line.
The user should be able to select a column and have their token (red or black) occupy the
lowest available space on the column. (Note: This doesnt have to be be fancy, a button at the
top of the row is fine.)
Notes
A sample layout (minus the reset button) for tic-tac-toe can be found on page 806 of your
book. You do not have to use their X and O images to get a good grade on this assignment.
Your reset button can be wherever you want it to be, but it must be visible to the user as to
where this button is.
Red should go first.
Unlike past assignments, I am fine with the main class being the board, but the board class
must be called Board.java.
Once a space is taken, you have to make sure that it cannot be claimed by the other player. For
example, if Red picks a spot Black cannot come in and take it.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

5. What information would the team members need?

Answered: 1 week ago