(Solved) : Game Chomp Https Enwikipediaorg Wiki Chomp Two Players Eat Board Chocolate According Follo Q31557985 . . .

In the game Chomp (https://en.wikipedia.org/wiki/Chomp) twoplayers eat a board Chocolate according to the following rules: •The upper left field is «poisoned». Who has to take it, has lost. •The player on the move selects a box that still contains chocolate,and Eats this and all the pieces that lie to the right or below it(so remove that Rectangle with the selected piece as upper leftcorner). Example: After selecting the fields (4, 3) and (2, 4) weget the following remainder table.
Write the source code and a makefile that produces a chompprogram. This reads from the standard input separated by spaces thefield size (width, height) and then the coordinates of the selectedfields (numbering starting at the top left with
1, first x, then y). The entry is completed with the coordinatepair (0, 0).
It should generate the following output:
• The number of remaining boxes of chocolate (including the”poisoned” box) if all moves are correct.
• The value -1, if a turn selects an already eaten piece ofchocolate or coordinates outside the board are selected.
The maximum size of the board is limited to 50 × 50 for healthreasons.
Notes on the task
To solve this task you need the following basic knowledge:
• Write a main () function
• Write a makefile
• Control flow (if) in C
• Functions in C
• Reading keystrokes
• grinding in C
• Fields in C
• Dynamic memory management (malloc)
• Using gcc
Programmeingabe für dieses Beispiel: 6 4 4 3 2 4 o 0 Ausgabe: 16. Show transcribed image text
Expert Answer
Answer to Game Chomp Https Enwikipediaorg Wiki Chomp Two Players Eat Board Chocolate According Follo Q31557985 . . .
OR