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

Resolved issue #275: Playground mode earthquake shows in history. #320

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

Peter-Kopko
Copy link

@Peter-Kopko Peter-Kopko commented Dec 5, 2024

I have solved a problem where the playground mode was saving simulated earthquakes from playground into an archive of real earthquakes, which would be later shown in the history tab of earthquakes.

The idea behind the fix is that now, instead of having one archive file, the application has two separate files for archiving earthquakes. The old one retains its old name (archive.dat) while the new one is called playground_archive.dat.

The changes in code were made in 3 files:

  • In EarthquakeArchive.java, I have added two new private attributes (PLAYGROUND_ARCHIVE_FILE, servesPlayground), changed privacy of existing attributes (ARCHIVE_FILE, TEMP_ARCHIVE_FILE), added two simple methods, one setter for a new attribute and the other one to choose a correct working file. Then I modified the rest of file accordingly.
  • In GlobalQuake.java, every created archive is now loaded based on isSimulation() method.
  • In GlobalQuakePlayground.java, I have removed createArchive() method override as it would have the same functionality as the parent method.

The last two commits are only my practice tests and an attempt to improve performance of certain piece of code. The solution to the issue itself is not there. The tests are for a different area of code as well.

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.

1 participant