Skip to content

Possible improvements to the code #1

@Betsy-Nazareno

Description

@Betsy-Nazareno

Greetings, I am a University student from Ecuador of the Engineering career in computer science. I am currently working on a code refactoring project where we have to find possible code smells and apply respective refactoring techniques.

Inspecting the code of this repository I have found 3 aspects in which the program can be improved:

  1. Replace nested if - else conditionals with polymorphism in the Spwan class.
  2. Encapsulate the Handler class's own collection to avoid manipulation of the entire collection from external classes.
  3. Pull up the method render to the parent GameObject class so that child classes do not duplicate this code.

In order to give you a better understanding of my suggestion, I am attaching a document with the summary and the necessary refactored code.
report.docx

Greetings, Betsy Nazareno.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions