Game-Design / Sprint3_actual / Code Reviews and Reflection / Sprint 4 / Rithvik Maintanability Review Sprint 4.txt
Rithvik Maintanability Review Sprint 4.txt
Raw
Rithvik Potluri
11/15/2021
Sprint 4
PlayerCollisonHandler.cs
Zach Jones

Zach wrote the PlayerCollisionHandler.cs file to provide implementation that handles collisions between link and the walls, blocks, and enemies in the game. This class starts with the constructor which takes in a game object. It then has a method that checks collisions with walls which takes in two parameters, a wall of type IBorder and the side of type ICollision. The method has a switch case which checks which side link collides with the wall and sets link’s position based on which side link collides with the wall. For example, if link collides with the left side of a wall, he stays on the left side of the wall. The next method that checks collision with blocks has the same implementation but takes in a block of IBlock instead of the wall. The next method is for when link collides with an enemy and this method ensures that link takes damage when he gets hit by an enemy. The next method checks to see if link collides with an item. This method is used for link to pick up items he runs into and return the item he is currently holding so it is replaced with the new item. Finally, the last method is used to check when link is hit by an enemy projectile. When focusing on the code quality of this class it is very efficient. There is no unnecessary code and the methods do a great job of using object orientated programming principles and hand off jobs to other methods instead of trying to do too much. One thing that could be fixed is providing the implementation for the if statement that checks if stageItem.hasActiveItem(). Other than that small problem that could easily fixed, this code is very maintainable and efficient.