Game-Design / Sprint2 / Sprint2_actual / Jackson Code Review Readability Sprint 2.txt
Jackson Code Review Readability Sprint 2.txt
Raw
Code Review Author: Jackson Chapman
Date: 10/3/21
Sprint 2
.cs file being reviewed: AquamentusSprite.cs
.cs file author: Shay Fabrizio
Time spent: 15 minutes

For the most part the AquamentusSprite class has good readability. The constructor is set up so every field or property of the class is
clearly assigned a value, whether from an incoming variable or set manually to determine other factors (such as speed or attack timing), and
the draw method is set up clearly as well, with the source and destination rectangle being established and used in the call to Draw(). The
update method is where it gets a little more complicated, and this is because Aquamentus has a lot of features that most of the other enemies
don't have, such as shooting three different projectiles and randomly deciding when to change directions in its movement. The most
complicated part of the method is the section where moveTimer is checked, which is a timer that determines when Aquamentus changes which way
it is moving. I think some of the numbers in this section could be set to variables, which would make it clearer what exactly is happening and
could make it easier to modify Aquamentus' behavior without needing to first determine what the unnamed numbers are actually representing.
This is done well with the lines of code where Aquamentus' position is actually updated, where the spriteSpeed variable is used, clearly
showing what purpose this variable serves.

An example (and this also affects some other classes in our project) that could help readability: I have thought about making a project-wide
Enum for direction, which would have Left, Right, Up, and Down. This class and a few others sometimes use arbitrary numbers to represent
directions, such as 1,2,3,4 for the primary directions or in this case using 1 and -1 for left and right. Having an enum for these could make
it clearer to someone reading the code how the behavior is changing.