Question: Write a C program can display a grid and take input from user. Start program by: game playera playerb height width. (Board size min 1x1
Write a C program can display a grid and take input from user.
Start program by: game playera playerb height width. (Board size min 1x1 max:1000x1000)
Player A will go first, ask user input coordinates(e.g PlayerA: 0 0)
To win the game, a player needs to connect opposite sides of the grid. e.g 0 wins by connecting left to right edges while X wins by connecting top and bottom edges
When winner is determined, display player? wins
Display error messages:
When user input incorrect player type message: invalid type
When grid dimmesion is invlaid message: invalid grid

E.g. this is a 4x4 grid Player A: 00 Player B:11 Player A: 01 00. Player B: 21 00. Player A: 02 Player B: 31 Player A: (): PlayerA wins
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
