EE285project-code
Question Description
Write this in C language.
Description
Four in a Line (known commercially as Connect Four) is a game in which two players take turnsadding tokens to a game board that consists of a 6-high by 7-wide grid. Players select thecolumn for their token, and the token is placed in the lowermost row that doesn’t already have atoken in it. The first player to place four tokens in a line (either horizontal, vertical, or diagonal)wins. The game results in a draw when there are no more grid spaces to place a token.
Required Functionality
1. Represent the game board as a two-dimensional array.
2. Represent a player as a struct that stores the players name and the number of gameswon.
3. Allow the two players to enter their names. Use each player’s name in the prompt fortheir turn.
4. Randomly choose which player goes first in the first game.
5. If the players play multiple games, alternate which player goes first.
6. If the players play multiple games, keep score for the number of games won for eachplayer and print it after each game.
7. Alternate turns between players. On each turn, the player should select the columnwhere they want to place a token.
8. Print the game board after each turn by passing the two-dimensional array to a functionthat you wrote.
9. Check for a winner or a draw after each turn by passing the two-dimensional array to afunction that you wrote.
10. Support winning by getting four in a row horizontally.
11. Support winning by getting four in a row vertically.
12. Support winning by getting four in a row diagonally.
13. At the end of a game, display which player won (or display that the game was a draw)and ask the players if they want to play again.
Coding Style Requirement
Use a clear and consistent coding style.
● Use proper indentation for the body of code blocks.
● Use descriptive variable and function names.
● Use consistent spacing, placement of brackets, newlines, etc.
send me back the pdf or text file.
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."