Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Topics: Dynamic 2D arrays, classes and methods In this assignment you are to create a connect-4 game. The standard game has 6 rows and 7
Topics: Dynamic 2D arrays, classes and methods In this assignment you are to create a connect-4 game. The standard game has 6 rows and 7 columns. The interface will look like this (with the highlighted numbers being user input. 0 123456 0123456 0 1 234 56 It is X's turn: It is O's turn: It is X's turn: Coluan The requirements are as follows: It must follow the rules (gravity and such) must check for winning conditions if a user wins, the game ends and the winner is declared the program should check for illegal input (columns less than 0 and greater than number of columns) there needs to be a 1 player option with a basic Al that plays the game. There is no constraint on this, it can play poorly. The game and logic should be contained in a Connect4 class with the following methods S void DrawBoardo bool GameOver) char Winner) bool MakeMove(char piece, int column) S Connect40//sets up standard game Connect4int NumRows, int NumColumns)//custom gameboard size int GetAIMove0 The connect 4 class should be in a separate header file The main.cpp file should contain the basic game loop and start up which asks the user how many players and whether it is the standard game or a custom board. . Bonus (10): Modify the game so that you can have more than 2 players with the custom board
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