Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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