Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program ConnectFour.java that implements the connect four game using multi-dimensional arrays. In the preceding figure, the red disk is shown as R and
Write a program ConnectFour.java that implements the connect four game using multi-dimensional arrays. In the preceding figure, the red disk is shown as "R" and the yellow disk as "Y". Whenever a disk is dropped, the program redisplays the board on the console and determines the status of the game (win, draw, or continue). If the user tries to enter more than 6 disks in one column, appropriate message should be displayed and the game should continue asking the user to enter into a new column.
java Connect Four 1 1 1 1 1 1 Drop a red disk at column (0-6): 0 1 1 1 1 RII L Drop a yellow disk at column (0-6): 3 1 1 1 1 1 1 1 1 | RU | Y Drop a yellow disk at column (0-6): 6 1 1 IR 1 1 1 1 1 1 | YRY 1 | | |RY|Y|YY| | R YR Y RRRI Yellow player WONStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started