USING C++ (CODEBLOCK)
Suggest a feature (additional game function) that you can add into the game.
Use control statements, functions, and arrays to implement such a feature. The additional feature does not need to originate from the existing game. Explain, including a description at the end of your overall answer.
Hint: If you are not able to think of a game feature, you can develop codes to determine the winner, but only a maximum of 50% of the allocated marks will be given.
(6 marks)
Sample output for Crewmate:
Enter the number of crewmates: 10
Enter the number of impostors: 2
Invalid input! Maximum of 10 players and 3 impostors are allowed.
Enter the number of crewmates: 5
Enter the number of impostors: 2
5 crewmates and 2 impostor(s) have been set.
***Options available to a Crewmate***
1 - Perform a task
2 - Report a dead body
3 - Vote for the impostor
Select a choice: 1
You have been assigned a short task.
11/12
KIE1004
***Options available to a Crewmate***
1 - Perform a task
2 - Report a dead body
3 - Vote for the impostor
Select a choice: 2
Latest number of crewmates: 5
Latest number of impostors: 2
***Options available to a Crewmate***
1 - Perform a task
2 - Vote for the impostor
Select a choice: 3
Number of impostors left: 1
Sample output for Impostor:
Enter the number of crewmates: 10
Enter the number of impostors: 2
Invalid input! Maximum of 10 players and 3 impostors are allowed.
Enter the number of crewmates: 5
Enter the number of impostors: 2
5 crewmates and 2 impostor(s) have been set.
***Options available to an Impostor***
1 - Sabotage the ship
2 - Kill someone
3 - Report a dead body
Select a choice: 1
You have been assigned with the reactor sabotage ability.
***Options available to an Impostor***
1 - Sabotage the ship
2 - Kill someone
3 - Report a dead body
Select a choice: 2
Number of crewmates left: 4
***Options available to an Impostor***
1 - Sabotage the ship
2 - Kill someone
3 - Report a dead body
Select a choice: 3
Latest number of crewmates: 4
Latest number of impostors: 2