Question: use the language c + + and object oriented programming for the following tasks Task 1 . Implement a console version of connect 4 .
use the language c and object oriented programming for the following tasks
Task Implement a console version of connect The playing field has five rows and seven columns.
Players are alternately asked to enter the column number to make a move. Make sure you only allow valid moves.
No invalid columns may be entered and no piece may be added to a column that is already full. Mark the squares
occupied by player with X those occupied by player with O and the empty squares with see figure As soon
as a player has four tiles in a row, they have won. If all squares are occupied and no player has won, it is a draw. Use
objectorientation in the implementation and divide the game sensibly into classes. A sensible division is for
example, to separate the game logic, the playing field and the input and output from each other.
Task Use pbmag to create a graphical version of the game. Add the command line option g to start the
graphical version. There should be several command line options for the game. Add the options rows and
cols to play the game in a different size. You should also be able to specify how long to wait until the
window closes. Your programme will output suitable help with the command line flag h
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
