Question: Project Instructions Type: This game ( project is a team of 2 students ) . A group is compulsory. To create this game you are
Project Instructions
Type: This game project is a team of students A group is compulsory.
To create this game you are allowed to use materials and concepts covered during COEN
lectures.
It is not allowed to use something that we didn't cover during our study otherwise, of your
grade will be deducted.
Submission:
Create one or more cpp files possibly a h file as you need.
Create a PDF file containing the screenshots of all use cases and their results.
Save the PDF the cpp files, the project form, and any additional files in one folder.
Name the folder as your lastnamestudent id
Compress the files using zip or other tools
Submit the zip file on Moodle
Please do not submit exe files
Only one student from a team can submit a project solution. Therefore, there is no need
for all team members to submit the same copy.
The main objective of this game is to apply the knowledge gained from the course lectures.
Project question
Write the code in C to simulate a Nim game. The rules of Nim are as follows:
This game includes two players.
Each player can pick up from one pile.
The player can only take one or two tokens.
The winner is the player who makes the last move.
Suppose we only have heaps.
The game must be recursive, namely, it calls itself each turn.
Try to use an array in C style for example to represent the heapsNote her the pile is represented by a row but you can draw it vertically as you like.
Assume player selects two tokens from the second pile, shehe may enter B or B then the game
shows
A:
B:
C:
D: OOOOO
E:
The second option, PC vs user, option allows the user to play against your algorithm.
Instead of using only heaps, prompt the user to enter the number of heaps or c olumns
The number of heaps piles can range from to
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
