COMP1511 19T2
Assignment 2 - Castle Defense
COMP1511 19T2

version: 1.5.2 last updated: 2019-08-11 14:30:00

Attribution of Work

This is an individual assignment. The work you submit must be your own work and only your work apart from exceptions below. Joint work is not permitted.

You may use small amounts (< 10 lines) of general purpose code (not specific to the assignment) obtained from site such as Stack Overflow or other publically available resources. You should attribute clearly the source of this code in a comment with it.

You are not permitted to request help with the assignment apart from in the course forum, help sessions or from course lecturers or tutors.

Do not provide or show your assignment work to any other person (including by posting it on the forum) apart from the teaching staff of COMP1511.

The work you submit must otherwise be entirely your own work. Submission of work partially or completely derived from any other person or jointly written with any other person is not permitted. The penalties for such an offence may include negative marks, automatic failure of the course and possibly other academic discipline. Assignment submissions will be examined both automatically and manually for such submissions.

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 penalized, 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.

Note, you will not be penalized if your work is taken without your consent or knowledge.

Submission of Work

You are required to submit intermediate versions of your assignment.

Every time you work on the assignment and make some progress you should copy your work to your CSE account and submit it using the give command below.

It is fine if intermediate versions do not compile or otherwise fail submission tests.

Only the final submitted version of your assignment will be marked.

All these intermediate versions of your work will be placed in a git repo and made available to you via a web interface at this URL, replace z5555555 with your zID:

https://gitlab.cse.unsw.edu.au/z5555555/19T2-comp1511-ass2_castle_defense/commits/master

This will allow you to retrieve earlier versions of your code if needed.

You submit your work like this:

give cs1511 ass2_castle_defense realm.c test_realm.c

It is not possible to submit your own realm.h or main.c. You should not modify your copies of those files in any way.

Assessment

This assignment will contribute 13% to your final mark.

70% of the marks for this assignment will be based on the performance of the functions you write in realm.c.

10% of the marks for this assignment will come from the test_realm.c file. We will examine your own test cases to assess how well they cover your code. Particularly we are looking for evidence you have thought about testing your own program, either by demonstrating it will work in a "realistic" use-case; or by testing interesting inputs to your functions to check they work under edge cases.

20% of the marks for assignment 2 will come from hand marking of the readability of the C you have written. These marks will be awarded on the basis of clarity, commenting, elegance and style. In other words, your tutor will assess how easy it is for a human to read and understand your program.

Here is an indicative marking scheme.

100 (HD) Completely working implementation of Stages 1-5; with beautiful code and a comprehensive test suite in test_realm.c.
85 (HD) Completely working implementation of Stages 1-4; with very readable code and a test suite with good coverage in test_realm.c.
75 (DN) Completely working implementation of Stages 1-3; with readable code and a test suite with reasonable coverage in test_realm.c.
65 (CR) Completely working implementation of Stages 1 and 2; with understandable code and a test suite that touches all stage 1-2 functions in test_realm.c.
50 (PS) Completely working implementation of Stage 1; with an attempt at readable code, and some tests in test_realm.c.
40-50 Partially working implementation of Stage 1.
-70% Knowingly providing your work to anyone and it is subsequently submitted (by anyone).
-70% Submitting any other person's work. This includes joint work.
0 FL for COMP1511 Paying another person to complete work. Submitting another person's work without their consent.

The lecturer may vary the assessment scheme after inspecting the assignment submissions but it will remain broadly similar to the description above.

Due Date

This assignment is due Sunday 11 August 18:00

If your assignment is submitted after this date, each hour it is late reduces the maximum mark it can achieve by 2%. For example if an assignment worth 78% was submitted 5 hours late, the late submission would have no effect. If the same assignment was submitted 15 hours late it would be awarded 70%, the maximum mark it can achieve at that time.

Change Log

Version 1.0
(2019-07-22 16:00:00)
  • Assignment released.
Version 1.0.1
(2019-07-22 23:30:00)
  • realm.c: fix minor style error
Version 1.1.0
(2019-07-22 12:00:00)
  • specification: clarify that searching recieves zero or one '*'
Version 1.1.1
(2019-07-22 12:00:00)
  • autotests: stage 5: add more edge cases, only test one enemy name
Version 1.2.0
(2019-07-25 22:00:00)
  • specification: simplify rules about duplicate namesautotests: stage 3: simplify rules about duplicate names
Version 1.3.0
(2019-07-25 23:00:00)
  • specification: clarify that you will never be given a tower after Castle.
  • main.c: fix typos and improve error messages when returning ERROR_INVALID_STAT
Version 1.4.0
(2019-07-26 10:00:00)
  • main.c: check name length for enemies and locations
  • specification: clarify that enemies die at 0 HP and below (not just below 0)
Version 1.4.1
(2019-07-26 12:30:00)
  • autotest: stage 2 and 4: make enemies always be given in the correct order
Version 1.4.2
(2019-08-04 21:30:00)
  • Add better information about what happens when the castle defense is below zero
Version 1.4.3
(2019-08-05 17:30:00)
  • Add more information and examples for searching.
Version 1.4.4
(2019-08-06 12:30:00)
  • Make local functions in test_realm.c be static
Version 1.5.0
(2019-08-10 00:00:00)
  • Added more info about how apply_damage should deal with the Castle, Better description of stage 5, and reordered tests.
Version 1.5.1
(2019-08-10 12:30:00)
  • Fixed small bug in sample solution that allowed 0 uses.
Version 1.5.2
(2019-08-11 14:30:00)
  • Fixed incorrect wording of Ice towers - enemies with HP == tower power do not advance.

Credits

Created by Andrew Bennett, Marc Chee, and Tom Kunc.