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

Rework Track/TrackSet management #65

Merged
merged 1 commit into from
Oct 16, 2020

Conversation

pehala
Copy link
Collaborator

@pehala pehala commented Oct 13, 2020

  • Split Tracks and their Statistics
    • So now the TrackManager and StatsManager are separate.
    • Add interfaces for TrackManager and StatsManager.
    • No changes on client-side yet, so the same statistics should show.
  • Add FileSystemTrackManager and FileSystemStatsManager.
    • They are read-only managers that load tracks and their stats.
  • Rewrite parsing
    • Works by registering individual LineParsers.
    • A lot of streams used (Can you tell I like functional programming? :D)
  • Move track related classes to shared module.
  • Add tests for the new parser and managers.
  • Replace a lot of concrete types with their interfaces (List instead of ArrayList)
  • Change TrackSets format.
    • Previously it used filenames, now it is just names
    • Rewrite existing TrackSets
    • As a feature, it is still broken but it is a little bit less broken than before.

Fixes #61

@pehala pehala requested a review from PhilippvK October 13, 2020 14:04
@pehala pehala mentioned this pull request Oct 13, 2020
@@ -227,10 +228,8 @@ public void actionPerformed(ActionEvent e) {
if(currentTrack == null) {
String data = new MapCompressor().compress(canvas.getMap());
String name = JOptionPane.showInputDialog(getThis(),"WUTS THE NAME OF THIS TRACK?");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xD

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Editor is a magical place :D

@pehala
Copy link
Collaborator Author

pehala commented Oct 14, 2020

I forgot to mention that this PR also removes morphia and mongodb dependencies, which reduces size of the server binary (4M -> 1,8M)

@PhilippvK
Copy link
Owner

Question: Would it be useful to keep the CUSTOM track category or for tracks build with the Editor if they do not fit into any other category?

Copy link
Owner

@PhilippvK PhilippvK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks very very good. But I was not able to compile and run it yet. I will let you know when I have tested everything.

@pehala
Copy link
Collaborator Author

pehala commented Oct 14, 2020

I don't think so, I think all those other categories are enough

@pehala
Copy link
Collaborator Author

pehala commented Oct 14, 2020

Editor track can be in normal categories

@PhilippvK
Copy link
Owner

@pehala I will merge this after you rebased client/client.iml .

- Split Tracks and their Statistics
- Rewrite parsing
- Migrate most of the track stuff to shared/
- Add tests for the new parser
@pehala
Copy link
Collaborator Author

pehala commented Oct 16, 2020

Rebased

@PhilippvK PhilippvK merged commit 22b5355 into PhilippvK:master Oct 16, 2020
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.

Rewrite Track handling
2 participants