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

[cleanUp] Cars should only be saved in one place, no possibleCars-Array etc #44

Open
Dachgruber opened this issue Feb 5, 2022 · 3 comments
Labels
enhancement New feature or request model features regarding the model
Milestone

Comments

@Dachgruber
Copy link
Collaborator

Currently the cars/objects get saved in lots of different places. Split Frogs/Animals from Cars/Traffic-Objects and save them in one place in the model. Then, only reference to the names of said save point

@Dachgruber Dachgruber added enhancement New feature or request model features regarding the model labels Feb 5, 2022
@Dachgruber Dachgruber added this to the Future milestone Feb 5, 2022
@Dachgruber Dachgruber added this to To do in ProjectBoard via automation Feb 5, 2022
@baschi29
Copy link
Owner

baschi29 commented Feb 5, 2022

I don't quite understand, do you mean the saving method? Because all StreetObjects only exist in the StreetObjects Array List in the model and nowhere else.

@Dachgruber
Copy link
Collaborator Author

Currently, when adding a new possible car to the model, you need to:

1.) add the car-name to Controller.addMovingObjects()
2.) add the actual car to the method above
3.) add the car name to Controller.initatePossibleCars()
4.) add the car name to View.getImg()

It should be possible to reduce the amount of steps needed, maybe by introducing one enum for all the car names (so that strings arent used to find the right car to add etc) and doing some general cleanup. Essentially for the future as other vehicle types and animal types are (possibly) planned.

@Dachgruber
Copy link
Collaborator Author

The possible cars with the stats etc could also be loaded froma CSV file, but this is another idea for the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request model features regarding the model
Projects
Development

No branches or pull requests

2 participants