CSIS-3280 - A Treasure Hunter Game - IT Assignment Help

Download Solution Order New Solution
Assignment Task

 

Create a PHP file following the naming convention and PHP standard recommendation (see the submission guideline document)

You are required to write a treasure hunter console game where you need to select a door to open and face whatever available in the room at each turn. You may face a trap, a monster or obtain the treasure. Carefully read the data structure of the treasure hunter and the rooms, the provided function signatures and comments in the code, the requirements below and the attached images of required output. You will get a ZERO mark if you use any global variable.

Please use the template code and the provided function signatures. It is designed so that you will practice function call, different type of arguments passing, loops and logics. You must not change any of the function signature. You can at most add a single simple helper function if needed.

Data structure
The Hunter data is stored as a multidimensional associative array. It holds the hunter’s name, health, stamina and action choices. The action choices are the action that the gamer needs to enter. Each action needs stamina and may provide some protection to whatever issue you deal in the opened room. Except for the initialization in
spawn_hunter() where the treasure hunter data is returned, the hunter array data is always passed by reference.

Functions
- stage_rooms(): stage the rooms, shuffle it and return the room data structure
- spawn_hunter(): generate and return the hunter data structure
- get_unopened_rooms(&$room_status): a helper function to get all unopened rooms. You may not need to use it.
- get_hunter_action_choices($hunter): a helper function to get all hunter action choices. You may not need to use it.
- hunter_action(&$hunter, &$rooms, &$room_status): ask the user to choose the action for the hunter open any of the unopened rooms. Once the room is opened, the hunter will need to deal with damage that he/she get from the room trap or monster.
o Get the list of all unopened rooms and ask the user to choose an action.
o If the hunter does not have enough stamina to perform the action, the room will not be opened.
o If the hunter has enough stamina

  • The room will be opened, and the room status will be updated.
  • The stamina and health of the hunter will be updated according to the action and damage from the room.
  • If there is a treasure, a flag stating that the treasure is obtained will be returned.

 

This CSIS-3280 - IT Assignment has been solved by our IT experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.