Pelialusta-Python-ohjelmointikurssille / pupupeli

Pelialusta Python-ohjelmointikurssille
MIT License
1 stars 1 forks source link

Toggle add remove #228

Closed thefakejj closed 1 week ago

thefakejj commented 1 week ago

NEED FEEDBACK: When calling cases "createObject" and "destroyObject" in event_handler.js initWorker, the program checks globals.task.getEnableAddRemove is true before executing. Is this fine?

Potential improvements: Call some kind of error (AttributeError?) if using these commands when enableAddRemove is false to trigger error message.

Next changes: Add checkbox or similar to editor.html so this field can be added to json easily

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Files Coverage Δ
src/util/task.js 88.23% <50.00%> (-3.44%) :arrow_down:
TommiTH commented 1 week ago

"When calling cases "createObject" and "destroyObject" in event_handler.js initWorker, the program checks globals.task.getEnableAddRemove is true before executing. Is this fine?" Seems like a good solution.