List of Common Mistakes for the 'Pong' (XNA-based) Assignment:



Suggested Percentage Of Assignment
(explanation here)
  Algorithm Implementation: AddToy


Efficiency In order to achieve constant-time ( O(1)  ) additions (to either list), you'll need to maintain a reference to the current last item in the list. -5%

(Failure to abide by the restrictions set forth in the assignment)

You should store the Toy objects in the same order that they are received in. -5%
  Algorithm Implementation: RemoveNextToy


Efficiency In order to achieve constant-time  ( O(1)  ) additions (to either list), you'll need to remove from the front of the list. -5%
Correctness You don't return a reference to the Toy object that you removed. -7%
Correctness You don't return null when there are no Toy objects in the LineOfToys -3%
Correctness You don't remove High speed Toy objects BEFORE removing any Normal speed Toy objects. -5%
Correctness Within a certain speed (high or normal), you don't remove the oldest Toy object -10%
  Algorithm Implementation: isEmpty


Correctness This doesn't correctly return true if (and only if) the QueueOfToys is empty, and false in all other situations -10%
  Algorithm Implementation: CurrentToyCount


Correctness You don't count all the Toy objects in the LineOfToys -20%
Correctness You don't count on all the High speed Toy objects BEFORE the Normal speed Toy objects. -10%
Efficiency You don't need to re-compute the total number of Toys here - if you keep a count (as an local (or instance) variable), you'll eliminate O(N) worth of work here. -3%
Correctness You don't update the bottom status bar with the correct number of High speed toys -4%
Correctness You don't update the bottom status bar with the correct number of Normal speed toys -4%
  Computer Efficiency            (Efficient use of resources, such as memory)


Don't create unused variables The variables r1, x, and y are unused – remove them. -1%
 Don't create unneeded local variables

For something like:
double distance = Math.Sqrt(((_centerX - x)*(_centerX - x)) + ((_centerY - y)*(_centerY - y)));
return distance;

you can instead write:
return Math.Sqrt(((_centerX - x)*(_centerX - x)) + ((_centerY - y)*(_centerY - y)));  

  Style / Presentation


Please give your variables that indicate what the variable is used for -2%

You didn't comment any of your code. 

Identify the author of each file

You didn't put your name, etc, at the top of EVERY  source code file, including any files given to you. (The "etc" part includes the name of this class (“BIT 142”), and the year and quarter, and the assignment number, including the revision number) 

Quality of presentation

(Make sure that what you've handed in looks good)

Code that you've commented out, because you're no longer using it, should be removed before handing in the assignment.

Horizontal Indentation Your code isn't formatted entirely consistently – in your C# file, try doing a "Select All", then under the "Edit" menu, under "Advanced", do "Format Selection" -1%
Vertical White Space Your code contains excessive numbers of blank lines in at least one place.   
  General Assignment Mistakes  
(Failure to abide by the restrictions set forth in the assignment) You modified part of the program, other than those parts of the program that supposed to be modified for this assignment.
NOTE: If you check with the instructor first, this penalty may be reduced or eliminated, on a case-by-case basis.  In general, modifying other parts of the program to make the program more fun, more cool, etc, have a good chance of being approved by the instructor.  Modifying other parts of the program in an attempt to avoid working/thinking hard for the assignment will always be penalized
(up to)
Submission Mistake You included the "Debug", "bin", or "obj" directories, and you shouldn't have. The assignment specifically said not to do this.

These result in point penalties, since the student has failed to complete one or more parts of the assignment, even though no particular percentage has been assigned to this category.

Submission Mistake

You didn't include the project files, please do so in the future. The assignment specifically said to do this.



Explanation of Percentages assigned:

Please note that for any given category, the total of the penalties may add up to more (or less) than the total for the category ; many of the mistakes are mutually exclusive (and since they therefore can't all apply, it's ok to add up to more than the category total), and if the student doesn't include any work in a particular category, it is suggested that you remove all points from that category (even if the individual items don't add up to the category total)

This document and the related materials are developed with support from Microsoft Research Computer Gaming Initiative under the Computer Gaming Curriculum in Computer Science RFP, Award Number 15871.