Prg1124 proramming principle the solution should have


You are required to complete the question.

Name your C program file as "game_name1.c" (the team leader's name without spaces and should not more than 20 characters, for example game_alex.c). If you use separate files for your main program and functions, then you need to zip all the files (.c and .h) in a .zip file and submit. You are required to:

- Submit the softcopy of the C program file (*.c or *.zip) to Elearn at location ‘Assignment -> Assignment Submission'. (Note: only the ‘.c' and ‘.h' file, not the whole project). Only one submission required per team by the team leader.

- Submit the hardcopy report to your lecturer, the hardcopy should include the printout of your code with the cover page and marking scheme, and all the testing output screenshots.

NOTE: Your submission must include a cover page with the name and signatures from all members in the group and the marking scheme. Report without a cover and marking scheme will not be accepted. Student without name and signature in the cover page will not be honoured the mark.

Question 1

Build a game solution for "Alice-in-the-Wonderland" in C program, where the game allows player to:
a) start a game:

The rules of game are:
i. The game should have a 15 rows x 20 columns map marked with asterisks (*). Indicate the entrance and exit with a symbol of your choice. In the map, there are items scattered randomly as below (you decide how many of each that you need):
- Life (#): the player will earn a life
- Poison (!): the player will lose a life
- Trap (O): the player will move backward a random number of steps (1 to 10).
- Ladder (H): the player will move forward a random number of steps (1 to 10).
Note: You can place certain items manually whichever you think appropriate (e.g. put more traps near to the exit)

ii. The mission of the player is to safely walk through the map from the entrance to the exit. If player overshoot the exit, it need to reverse back.

iii. The game should allow player to choose among 2 types of game:
- Player 1 and Computer
- Player 1 and Player 2

iv. The game should allow player to choose among 3 stages of difficulties. For example:
- Beginner: less poisons and traps
- Advance: more poisons and traps

v. Each player of the game will carry 5 lives from the start. The game will end when one of the below condition is met:
- The player who first reach the exit will win the game.
- The opponent who run out of life will lose the game.
.
vi. The players will take turn to throw a dice (with value 1 to 6) to decide how many steps to move forward. If the player is the computer, throw the dice automatically. You need to indicate the position of the players in the map with a symbol of your choice.

vii. Once the game is over, the screen should display the total number of steps each player has taken, and the remaining life of each player.

viii. The score is based on number of steps taken, the lesser the steps the better. If the score is within the top 5 scores, the score will be stored into a file.

Example of the game board once the game start:

S

*

*

*

O

*

*

*

!

*

*

*

*

*

*

*

*

*

O

*

*

*

*

H

*

*

O

*

*

*

*

*

*

!

*

*

*

*

*

*

*

*

*

*

*

#

*

*

!

*

*

*

*

O

*

*

*

#

*

*

*

*

*

*

*

*

*

H

H

*

*

O

*

*

*

*

*

*

*

*

O

*

*

*

!

*

!

*

*

*

*

*

*

H

*

H

*

*

O

*

*

*

*

*

*

*

*

*

*

*

*

*

H

*

*

*

*

*

*

!

*

H

*

*

*

#

*

*

O

*

*

*

*

*

#

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

H

*

*

*

*

*

*

*

*

*

*

*

!

O

*

*

*

!

*

*

*

*

H

*

*

*

H

*

H

O

*

*

*

*

H

*

*

*

*

#

*

*

*

*

!

*

*

*

*

*

*

#

*

*

*

*

*

O

*

*

*

*

O

*

*

*

*

*

!

*

*

*

*

*

H

!

*

*

*

*

*

*

*

H

*

*

*

*

*

*

*

*

*

*

*

*

*

*

H

*

!

*

!

*

*

#

*

*

*

!

*

*

*

*

*

O

*

!

*

*

*

*

O

*

*

*

*

*

*

*

O

*

*

#

*

*

H

*

O

O

O

*

H

O

*

O

*

E

b) display the top 5 scores:
List the top 5 scores in order.
c) reset the top 5 scores list:
Delete the top 5 scores list.
d) exit game:
Display "Thank you and see you next time".

The solution should have input data validation, and design using proper logic and data structure. You are required to use multi-subscripted array

You're encouraged to improve your code structure by using functions, add in any additional controls, validations or messages which you think are appropriate.

Variances of display design, arrangement or style are allowed, as long as it fulfilled the game requirement stated above.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Prg1124 proramming principle the solution should have
Reference No:- TGS01703854

Expected delivery within 24 Hours