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

More client code quality improvements, removing more unused assets #116

Merged
merged 4 commits into from
Aug 17, 2024

Conversation

StenAL
Copy link

@StenAL StenAL commented Aug 16, 2024

This PR contains a bunch of cleanup but no functional changes:

  • NOP is renamed to number of players, without deep context it is not obvious what the (R)NOP classes were doing
  • Static initializer blocks were removed in favor of initializing static fields in their declarations
  • A bunch of unused assets were removed, mostly related to AGolf2 but also some old server code relics and assets from other games
  • A bunch of small code quality improvements:
    • Use integers instead of chars in math operations
    • Use more magic constants where possible
    • Remove more unused imports
    • Remove useless JavaDocs that just say "Playforia"
    • Remove some explicit uses of UTF-8 enconding. This is the default
      encoding since Java 18.
    • Remove unused LobbyRef class

(R)NOP without any context was confusing. The new solution is a bit
verbose but at least it's possible to instantly know what it does.
The code is easier to follow if static final fields are initialized in
the same place they are declared.
These are mostly related AGolf2, a different game from the classic
minigolf. Also included are some old server code relics and assets from
other games.
- Use integers instead of chars in math operations
- Use more magic constants where possible
- Remove more unused imports
- Remove useless JavaDocs that just say "Playforia"
- Remove some explicit uses of UTF-8 enconding. This is the default
  encoding since Java 18.
- Remove unused LobbyRef class
@PhilippvK PhilippvK merged commit 7d9af23 into PhilippvK:master Aug 17, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants