The purpose of this assignment is to practice:
This assignment simulates play of Connect4, a popular strategy game. Here s an overview of the game:
Connect Four (also known as Captain's Mistress, Four Up, Plot Four, Find Four, Fourplay, Four in a Row and Four in a Line) is a two‐player game in which the players first choose a color and then take turns dropping colored discs from the top into a seven‐column, six‐row vertically‐suspended grid. The pieces fall straight down, occupying the next available space within the column. The object of the game is to connect four of one's own discs of the same color next to each other vertically, horizontally, or diagonally before your opponent. Source: http://en.wikipedia.org/wiki/Connect_Four
For this assignment, the Connect4 game will be modeled using a Grid class. The Grid class defines the game board. A Connect 4 grid has 6 rows and 7 columns. The Grid class represents the game board with a 2 dimensional array of chars. There are three values that will be used for the chars: B (for black), R (for red), and * for an empty cell.
Your Grid class will need the following methods.
Your game board must be scalable. In other words, the constructor accepts arguments for the number of rows and columns and all methods work properly with any size board.
I am providing methods that control the game play. You MUST NOT change any of the code that I provide or your program will not compile when it is submitted.