These general comments apply to all the sprite classes you modified, such as SubmarineSprite, TorpedoSprite, etc
If your code reached professional standard (i.e. better than we'd expect from a student)
then you could get 8/10, 9/10 or 10/10 - although you'd only get the highest marks if your
code is excellent in all areas, including comments and consts!
If
your code reached the best standard we'd expect from a student then you would get 7/10
This would be reduced if you made any errors with each new type of error reducing the mark
by 1
The minimum mark for correctly working code was 4/10
Most common reasons for losing marks:
if statements instead of if ...
elseif (boolFlag == true) instead of if (boolFlag)if (boolFlag == false) instead of if (!boolFlag)Show flag to see if an animation has finishedNormally, whatever error you made would be flagged up on your individual feedback sheet.
Marks were normally given based on the number comments you put in the code, provided the
comments actually made sense. In general, the more comments you put in, the higher the mark.
A number of you put in comments, but they were faulty in some way. These were generally pointed out but mostly did not get any penalty. However, you should take note of them and make sure you avoid them in later work.
Typical problems in comments (not normally penalised this time):
// Test the show flag
if (!Show) { ... // Test if the animation sequence has finished
if (!Show) { ...if (!Show) { // Test
if the animation has finishedImportant note: You don't need to put a comment for every statement in your code. Instead, it is usually more effective to break code down into "paragraphs" and then put a single comment to describe the paragraph. For example:
case SAILING:
// Has the ship been hit by a torpedo?
if (_hitByTorpedo)
{
// Start the explosion animation and change state
SetCycle(-1, 10, 10);
FrameNumber = 1;
_state = SINKING;
}
// User holding down left and right?
else if (kbState.IsKeyDown(Keys.Left) && kbState.IsKeyDown(Keys.Right)
{
// Can't go anywhere so do nothing!
}
: : :
I am pleased to say that most of you followed the naming conventions and scored full marks in this section.
You should use a const for every number you write in your code (with the possible exception
of 0 or 1) and you earned full marks if you did this.
Marks were reduced if you put numbers in your code without making them consts.
If you didn't create any consts at all then you got zero for this section.
Remember: Each time you write 50, or 100 or whatever in your code you should make it a const!
If you managed to get the game working by uncommenting the supplied boilerplate (nearly everybody) then you scored 8 marks.
A small number of students made some really clever modifications to the code which improved it and they scored 10 marks.
See your individual feedback
Nearly everybody got full marks in this section.