Sonarcloud testing Sprint Three - UQdeco2800/2022-studio-2 GitHub Wiki

Introduction

In the sprint three, we had more code smells in our code, but we had fewer bugs. Similar to the last sprint, we removed some unused imports and variables, but there were still some package naming and accessor modifier code smells that were highlighted and potentially needed to be changed. And fixed bugs that we build. Major Bugs There are we needed to change the Data Type from the following.

Solutions Fixed

Minor Issues

Some of the minor issues in the game which were fixed included: 1.

  1. Removed unused variables
  2. Removed old comments

image

Remove the temporary variable "material"

image


image

Remove the "index" field and declare it as a local variable in the relevant methods

image


image

Remove the unnecessary boolean"true"

image

Major Issues

This major code smells issue which has been resolved is the lack of constructors in our material factory classes. In this sprint I added an empty constructor to these classes to resolve this.

image

add private constructor

image


This major code smells issue which has been resolved is not use string format game area display class. In this sprint I use string format to rewrite this line to resolve this. image

Use format specifiers

image


image

Rename Variable

image


image Remove this useless assignment to local variable "materials" image


image

Ignored NullPointerException

image

Major Bugs

Future

In the final polish phase of the game, we need to check the game for more minor errors and clean up any notes we want to keep or edit in the final sprint.