1. Homepage
  2. Coding
  3. COMP1511 Programming Fundamentals - Assignment 2 - CS Dungeon!

COMP1511 Programming Fundamentals - Assignment 2 - CS Dungeon!

Chat with a Specialist
UNSWCOMP1511Programming FundamentalsCOMP1911CS DungeonC

Assignment 2 - CS Dungeon!

Your task in assignment 2 is to create a dungeon crawler game, where you will get to design a map of connected dungeons filled with monsters, items, and a final boss at the end to defeat! You will get to play as either a Fighter or a Wizard, using your special skills and stats to defeat these monsters and beat the game!

The game consists of a setup phase, where you add dungeons and items, and a gameplay phase, where you as the player will get to move between dungeons, fight monsters and collect items that can make you even stronger! Assignment Writing Service

You can read about the history of dungeon crawler games here. Assignment Writing Service

Overview

COMP1911 Students

If you are a COMP1911 student, you will be assessed on your performance in stages 1 and 2 ONLY for this assignment, which will make up the performance component of your grade. Style will be marked as usual and will make up the remaining 20% of the marks for this assignment. You are NOT required to attempt stages 3 and 4. You may attempt the later stages if you wish, but you will not be awarded any marks for work beyond stage 2. Assignment Writing Service

COMP1511 Students

If you are a COMP1511 student, you will be assessed on your performance in stages 1 through 4, which will make up the performance component of your grade. Style will be marked as usual and will make up the remaining 20% of the marks for this assignment. Assignment Writing Service

Assignment Structure

This assignment will test your ability to create, use, manipulate and solve problems using linked lists. To do this, you will be implementing a dungeon crawler game, where the dungeons are represented as a linked list, stored within a map. Each dungeon contains a list of items. The map also contains a player struct, which also contains a list of items. Assignment Writing Service

We have defined some structs in the provided code to get you started. You may add fields to any of the structs if you wish. Assignment Writing Service

Assignment Writing Service

Assignment Writing Service

The following enum definitions are also provided for you. You can create your own enums if you would like, but you should not modify the provided enums. Assignment Writing Service

Assignment Writing Service

Assignment Writing Service

Getting Started

There are a few steps to getting started with CS Dungeon. Assignment Writing Service

  1. Create a new folder for your assignment work and move into it. You can follow the commands below to link and copy the files.
mkdir ass2
cd ass2
  1. There are 3 files in this assignment. Run the following command below to download all 3, which will link the header file and the main file. This means that if we make any changes to cs_dungeon.h or main.c, you will not have to download the latest version as yours will already be linked.
1511 fetch-activity cs_dungeon
  1. Run 1511 autotest cs_dungeon to make sure you have correctly downloaded the file.
1511 autotest cs_dungeon
  1. Read through the rest of the introductory specification and Stage 1.

Starter Code

This assignment utilises a multi-file system. There are three files we use in CS Dungeon: Assignment Writing Service

  • Main File (main.c): This file handles all input scanning and error handling for you. It also tests your code in cs_dungeon.c and contains the main function. You don't need to modify or fully understand this file, but if you're curious about how this assignment works, feel free to take a look. You cannot change main.c. Assignment Writing Service

  • Header File (cs_dungeon.h): contains defined constants that you can use and function prototypes. It also contains header comments that explain what functions should do and their inputs and outputs. If you are confused about what a function should do, read the header file and the corresponding specification. You cannot change cs_dungeon.h. Assignment Writing Service

  • Implementation File (cs_dungeon.c): contains stubs of functions for you to implement. This file does not contain a main function, so you will need to compile it alongside main.cThis is the only file you may change. You do not need to use scanf or fgets anywhere. Assignment Writing Service

The implementation file cs_dungeon.c contains some provided functions to help simplify some stages of this assignment. These functions have been fully implemented for you and should not need to be modified to complete this assignment. Assignment Writing Service

These provided functions will be explained in the relevant stages of this assignment. Please read the function comments and the specification as we will suggest certain provided functions for you to use. Assignment Writing Service

How to Compile CS Dungeon

Assignment Writing Service

Assignment Writing Service

Reference Implementation

To help you understand the expected behaviour of CS Dungeon, we have provided a reference implementation. If you have any questions about the behaviour of your assignment, you can check and compare yours to the reference implementation. Assignment Writing Service

To run the reference implementation, use the following command: Assignment Writing Service

 1511 cs_dungeon

Assignment Writing Service

Assignment Writing Service

The easiest way to understand how this assignment works is to play a game yourself! Below is example input you can try by using the reference solution. Assignment Writing Service

Assignment Writing Service

Assignment Writing Service

Allowed C Features

In this assignment, there are no restrictions on C Features, except for those in the Style Guide. If you choose to disregard this advice, you must still follow the Style Guide. Assignment Writing Service

You also may be unable to get help from course staff if you use features not taught in COMP1511. Features that the Style Guide identifies as illegal will result in a penalty during marking. You can find the style marking rubric above. Please note that this assignment must be completed using only Linked Lists . Do not use arrays in this assignment. If you use arrays instead of linked lists you will receive a 0 for performance for this assignment. Assignment Writing Service

Banned C Features

In this assignment, you cannot use arrays for the list of dungeons nor the lists of items and cannot use the features explicitly banned in the Style Guide. If you use arrays in this assignment for the linked list of dungeons or the linked lists of items you will receive a 0 for performance in this assignment. Assignment Writing Service

FAQ

Assignment Writing Service

Assignment Writing Service

Game Structure

This game consists of a setup phase and a gameplay phase. Assignment Writing Service

You will be implementing both the setup phase and gameplay phase throughout this assignment, adding more features to both as you progress. By the end of **stage 1.4****you will have implemented parts of both setup and gameplay enough to play a very basic game. Assignment Writing Service

The game is ended either by the user entering Ctrl-D, the win condition being met, or the player running out of health points. The program can also be ended in the setup phase with Ctrl-D or q. Assignment Writing Service

Your Tasks

This assignment consists of four stages. Each stage builds on the work of the previous stage, and each stage has a higher complexity than its predecessor. You should complete the stages in order. Assignment Writing Service

A video explanation to help you get started with the assignment can here found here: Assignment Writing Service

Assignment Writing Service

Assignment Writing Service

Assignment Writing Service

Assignment Writing Service

Assignment Writing Service

Assignment Writing Service

Assignment Writing Service

Assignment Writing Service

Assignment Writing Service

Assignment Writing Service

Stage 4

This stage is for students who want to challenge themselves, and solve more complicated linked lists and programming problems, such as: Assignment Writing Service

  • Teleportation between dungeons
  • Defeating the final boss

Stage 4.1 - Teleportation Between Dungeons

In Stage 4.1, we’d like to be able to teleport the player between dungeons. Assignment Writing Service

Enter Command: T

All dungeons can be teleported to. When the T command is entered, the player should teleport to the furthest dungeon from the current dungeon they are in, unless that dungeon has already been teleported to. Once all dungeons have been teleported to, the pattern can begin again. Assignment Writing Service

For example, a map with 4 dungeons. If the player starts in the first dungeon, their movements would be as follows (the player is represented by the knight character): Assignment Writing Service

stage4.4-1.svg Assignment Writing Service

There is one function in cs_dungeon.c that you will have to implement for Stage 4.1teleportINVALID should be returned when there is only one dungeon in the map, otherwise, VALID should be returned. Assignment Writing Service

Clarifications

  • Whenever the map is changed (by shuffling in Stage 4.2 or by removing empty dungeons), the teleportation movement should restart, as if no dungeons have been teleported to yet.
  • When the player moves between dungeons with > or <, the teleportation movement should restart, as if no dungeons have been teleported to yet.
  • If multiple dungeons are equidistant, the player should travel to the first one in the map.
  • The first dungeon the player starts the teleportation cycle in counts as being teleported to.

Examples

Assignment Writing Service

Assignment Writing Service

Stage 4.2 - The Final Boss

We have finally reached the final boss! When the final boss is attacked for the first time, it becomes so enraged, spreading its power across the dungeon, shaking things up so that the map becomes unrecognisable. In this stage you will be implementing the boss_fight function. Assignment Writing Service

Enter Command: b

To be able to attack the final boss, the player must have the required item type in their inventory, not yet used. Assignment Writing Service

When the player attacks the final boss, they should deal either physical damage or magical damage, as calculated in fight from Stage 2.4. They should do whichever does more damage. If the damage is equal, they should deal magical damage. Assignment Writing Service

The first time the boss is attacked, the map should be shuffled, so that pairs of dungeons switch places. Below is an example diagram of a dungeon map containing 4 dungeons: Assignment Writing Service

stage4.4-2.svg Assignment Writing Service

When attacking a boss, the boss can sustain damage, and can be damaged across multiple turns. Bosses will fight back each turn the player is in the same dungeon, and when they reach 50% of their original health or less, they will do 1.5 times more damage. Assignment Writing Service

Bosses will follow the player (but cannot teleport), and will attempt to reach the player by moving towards them each turn. If they are in the same dungeon as the player, they will attack. Bosses can move or attack, but not both in the same turn. Assignment Writing Service

You will need to add code to your end_turn function. A turn should run as follows: Assignment Writing Service

  1. Player action (including shuffling the map if it is the first time the boss is attacked)
  2. Monster attacks
  3. Remove any empty dungeons
  4. Boss attack or move
  5. Check if the game is over

If the player defeats the boss, then you should call the helper function print_boss_defeat after both the player and the boss have done their actions for the turn. Assignment Writing Service

Clarifications

  • If there is an odd number of dungeons, e.g. 5 dungeons, swap the first 4, leaving the last dungeon in its original position.
  • boss_fight should return NO_BOSS when there is no boss present in the current dungeon, NO_ITEM when the player does not have the required item to fight the boss, and VALID otherwise.
  • Make sure to go back and check your code from Stage 3.1 to check if the boss has been defeated. If the boss is defeated, their points should be added to the player's point total.
  • Whenever the map is changed, the teleportation movement Stage 4.1 should restart, as if no dungeons have been teleported to yet.
  • The boss only start moving once attacked for the first time.
  • You may assume the same shield power logic as Stage 2.4 applies to the boss damage.

Examples

Assignment Writing Service

Assignment Writing Service

Assignment Writing Service

Assignment Writing Service

Testing and Submission

Remember to do your own testing Assignment Writing Service

Are you finished with this stage? If so, you should make sure to do the following: Assignment Writing Service

  • Run 1511 style and clean up any issues a human may have reading your code. Don't forget -- 20% of your mark in the assignment is based on style and readability!
  • Autotest for this stage of the assignment by running the autotest-stage command as shown below.
  • Remember -- give early and give often. Only your last submission counts, but why not be safe and submit right now?
1511 style cs_dungeon.c
1511 autotest-stage 04 cs_dungeon
give cs1511 ass2_cs_dungeon cs_dungeon.c

Assignment Writing Service

Assignment Writing Service

Assignment Writing Service

Assignment Writing Service

Assignment Writing Service

Assignment Writing Service




Assignment Writing Service

Assessment

Assignment Conditions

  • Joint work is not permitted on this assignment. Assignment Writing Service

    This is an individual assignment. Assignment Writing Service

    The work you submit must be entirely your own work. Submission of any work even partly written by any other person is not permitted. Assignment Writing Service

    The only exception being if you use small amounts (< 10 lines) of general purpose code (not specific to the assignment) obtained from a site such as Stack Overflow or other publicly available resources. You should attribute the source of this code clearly in an accompanying comment. Assignment Writing Service

    Assignment submissions will be examined, both automatically and manually for work written by others. Assignment Writing Service

    Do not request help from anyone other than the teaching staff of COMP1511. Assignment Writing Service

    Do not post your assignment code to the course forum - the teaching staff can view assignment code you have recently autotested or submitted with give. Assignment Writing Service

    Rationale: this assignment is an individual piece of work. It is designed to develop the skills needed to produce an entire working program. Using code written by or taken from other people will stop you learning these skills. Assignment Writing Service

  • The use of code-synthesis tools, such as GitHub Copilot, is not permitted on this assignment. Assignment Writing Service

    The use of Generative AI to generate code solutions is not permitted on this assignment. Assignment Writing Service

    Rationale: this assignment is intended to develop your understanding of basic concepts. Using synthesis tools will stop you learning these fundamental concepts. Assignment Writing Service

  • Sharing, publishing, distributing your assignment work is not permitted. Assignment Writing Service

    Do not provide or show your assignment work to any other person, other than the teaching staff of COMP1511. For example, do not share your work with friends. Assignment Writing Service

    Do not publish your assignment code via the internet. For example, do not place your assignment in a public GitHub repository. Assignment Writing Service

    Rationale: by publishing or sharing your work you are facilitating other students to use your work, which is not permitted. If they submit your work, you may become involved in an academic integrity investigation. Assignment Writing Service

  • Sharing, publishing, distributing your assignment work after the completion of COMP1511 is not permitted. Assignment Writing Service

    For example, do not place your assignment in a public GitHub repository after COMP1511 is over. Assignment Writing Service

    Rationale:COMP1511 sometimes reuses assignment themes, using similar concepts and content. If students in future terms can find your code and use it, which is not permitted, you may become involved in an academic integrity investigation. Assignment Writing Service

Violation of the above conditions may result in an academic integrity investigation with possible penalties, up to and including a mark of 0 in COMP1511 and exclusion from UNSW. Assignment Writing Service

Relevant scholarship authorities will be informed if students holding scholarships are involved in an incident of plagiarism or other misconduct. If you knowingly provide or show your assignment work to another person for any reason, and work derived from it is submitted - you may be penalised, even if the work was submitted without your knowledge or consent. This may apply even if your work is submitted by a third party unknown to you. Assignment Writing Service

If you have not shared your assignment, you will not be penalised if your work is taken without your consent or knowledge. Assignment Writing Service

For more information, read the UNSW Student Code , or contact the course account. The following penalties apply to your total mark for plagiarism: Assignment Writing Service

0 for the assignmentKnowingly providing your work to anyone and it is subsequently submitted (by anyone).
0 for the assignmentSubmitting any other person's work. This includes joint work.
0 FL for COMP1511Paying another person to complete work. Submitting another person's work without their consent.
联系辅导老师!
私密保护
WeChat 微信
UNSW代写,COMP1511代写,Programming Fundamentals代写,COMP1911代写,CS Dungeon代写,C代写,UNSW代编,COMP1511代编,Programming Fundamentals代编,COMP1911代编,CS Dungeon代编,C代编,UNSW代考,COMP1511代考,Programming Fundamentals代考,COMP1911代考,CS Dungeon代考,C代考,UNSW代做,COMP1511代做,Programming Fundamentals代做,COMP1911代做,CS Dungeon代做,C代做,UNSWhelp,COMP1511help,Programming Fundamentalshelp,COMP1911help,CS Dungeonhelp,Chelp,UNSW作业代写,COMP1511作业代写,Programming Fundamentals作业代写,COMP1911作业代写,CS Dungeon作业代写,C作业代写,UNSW编程代写,COMP1511编程代写,Programming Fundamentals编程代写,COMP1911编程代写,CS Dungeon编程代写,C编程代写,UNSW作业答案,COMP1511作业答案,Programming Fundamentals作业答案,COMP1911作业答案,CS Dungeon作业答案,C作业答案,