Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues #45

Open
3 of 4 tasks
Alexis-Brockway opened this issue Nov 19, 2024 · 0 comments
Open
3 of 4 tasks

Issues #45

Alexis-Brockway opened this issue Nov 19, 2024 · 0 comments

Comments

@Alexis-Brockway
Copy link
Contributor

Alexis-Brockway commented Nov 19, 2024

  • Redundant Variable:
    Lines: 83,88
    Class: TextPresenterTest
    Info:
    Runnable is an interface
    Our Conclusion:
    Not needed, and can be deleted
    Lines: 72,73
    Class: Gride
    Info:
    You make a grid to then just return it
    Our Conclusion:
    You can just inline this function

  • Simplify if statement:
    Line : 89
    Class: TestPresenter
    Info:
    There is an if statement that is answer == true you need to just make the if statement
    if(answer)

  • Simplify Testing Code:
    Line: 53
    Class: CooedTest
    Info:
    You have an assertEquales that really need to be an assertTrue
    Lines: 52,62
    Class: GrideTest
    Info:
    These are assertEquals that need to be assertFalse
    Line:76
    Class: GrideTest
    Info:
    This is assertEquals that needs to be assert True

  • Make final
    Class: GridTest
    Line: 9
    Info:
    Make the object final
    Our concussion:
    Change it
    Class: Grid
    Line: 15
    Info:
    Make the shipList field final
    Confusion:
    You do not want to change the list of ships after you make it, but we decide to make
    it into where you can restart the game with a new grid size you want to change this
    back to not final
    Class: ship
    Line: 13
    Info:
    Make the startcoordinate field final
    Confusion:
    You want this be to final because they will start at the same spot every time

    Class: ShipTest
    Lines: 9,10,11
    Info:
    Make fields coordinate,ship,grid
    Concussion:
    Once they are declared they are not changed
    Class: TextPresenter
    Lines: 14,15,16
    Info:
    Make the fields output,input,scanner final
    Concussion:
    You would have no reason to change these after you have started the game because
    it will change where you see the output is at.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant