Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Project: Connect 4

AP Computer Science A

Goal: This project is intended to help you understand how to use two dimensional arrays. You should hand in .java files (zip all of your .java files and hand in just one .zip file) for the below problem. Please name and number the problems appropriately (something like Connect4_YourName.java). Make sure you upload all files needed for the lab and name class files appropriately.

1.  Create the game Connect 4, along with a computer player. Look at Wikipedia for more information.

–   The board should be 6 rows by 7 columns and is either empty, occupied by player 1 (red X), or occupied by player 2 (yellow O). A person wins the game when they have four of their“discs”' in four adjacent spaces, including the diagonals. The searching may be similar to the way you looked for words in your midterm

project.

–   Create a computer player which makes intelligent moves (one step smarter than randomly choosing an open

column)

–   The user should be able to select 0, 1, or 2 player (0 should play computer versus computer)

–   You must use all of the methods and classes provided for you in the example code.

–   You should not change any method signatures or the given toString , except to possible switch player num­ bers if you prefer (Right now, board = 0 ->“O”for player 2 and board = 1 ->“X”for player 1. Change if you prefer other numbers.)