Assignment title: Information
__________________________________________________________________________
FACULTY OF SCIENCE AND TECHNOLOGY
COURSEWORK FOR
BSC (HONS) INFORMATION SYSTEMS; YEAR 1
BSC (HONS) INFORMATION TECHNOLOGY; YEAR 1
BSC (HONS) COMPUTER SCIENCE; YEAR 1
BSC (HONS) INFORMATION TECHNOLOGY (COMPUTER NETWORKING AND
SECURITY); YEAR 1
BSc (HONS) INFORMATION SYSTEMS (BUSINESS ANALYTICS); YEAR 1
ACADEMIC SESSION AUGUST 2016; SEMESTER 1
PRG1124: PRORAMMING PRINCIPLE
INSTRUCTIONS TO CANDIDATES
• Assignment: This assignment will contribute 15% to your final grade.
• This is a group assignment of max 5 persons.
IMPORTANT
The University requires students to adhere to submission deadlines for any form of assessment. Penalties are applied in relation to unauthorized late submission of work.
- Coursework submitted after the deadline but within 1 week will be accepted for a maximum mark of 40%.
- Work handed in following the extension of 1 week after the original deadline will be regarded as a non-submission and marked zero.
Lecturer's Remark (Use additional sheet if required)
We ………...., ………...., ………...., …………… & …................ (Name) ................,. ..............., ………...., ……………. &……..........std. ID received the assignment and read the comments ..............., ..............., .............., ..................... & ……………... (Signature/date)
Academic Honesty Acknowledgement
"We ..............., ............., ………...., ……….... & ............... (student name) verify that this paper contains entirely our own work. We have not consulted with any outside person or materials other than what was specified (an interviewee, for example) in the assignment or the syllabus requirements. Further, we have not copied or inadvertently copied ideas, sentences, or paragraphs from another student. We realize the penalties (refer to page 16, 5.5, Appendix 2, page 44 of the student handbook diploma and undergraduate programme) for any kind of copying or collaboration on any assignment."
..............., …….............., ………...., ……......... & ……............. (Student's signature / Date)
[This paper contains ONE questions printed on TWO pages]
Marking Scheme
Criteria Requires Revision to Meet Requirements
(0 - 2 marks) Meets Minimum Requirements
(3 - 4 marks) Exceeds Requirements
(5 marks) Marks
Technical
Correctness • Many technical, syntax or structure errors
• Not able to achieve most or all of the anticipated result
• Some technical, syntax or structure errors
• Not able to achieve some of the anticipated result • No technical, syntax or structure errors
• Able to achieve all the anticipated result
Problem Solving • Many deficiencies in problem solving logic
• Some deficiencies in problem solving logic or problem solving logic is not optimum
• Excellent problem solving logic
• Able to cater for all the scenarios.
Structure • Lack of user-friendliness and tidiness of code
• Many programming best practices are not followed.
• Average user-friendliness and tidiness of code
• Some programming best practices are not followed. • Good user-friendliness and tidiness of code
• Programming best practices is followed throughout the code.
TOTAL
_____ / 15
You are required to complete the question below.
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 (15 marks)
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.
Hope you enjoy programming!
~ END OF PAPER ~