FIUS / ICGE2

Version 2 of the Introduction Course Game Engine for the FIUS Java Introduction Course
MIT License
5 stars 4 forks source link

Collecting and dropping a Coin results in an Error #187

Closed nk-coding closed 4 years ago

nk-coding commented 4 years ago
java.lang.IllegalStateException: This entity can only be on a single playfield!
    at de.unistuttgart.informatik.fius.icge.simulation@2.3.4/de.unistuttgart.informatik.fius.icge.simulation.entity.BasicEntity.initOnPlayfield(BasicEntity.java:84)
    at de.unistuttgart.informatik.fius.icge.simulation@2.3.4/de.unistuttgart.informatik.fius.icge.simulation.internal.playfield.StandardPlayfield.addEntity(StandardPlayfield.java:188)
    at de.unistuttgart.informatik.fius.icge.simulation@2.3.4/de.unistuttgart.informatik.fius.icge.simulation.entity.GreedyEntity.drop(GreedyEntity.java:117)
    at de.unistuttgart.informatik.fius.icge.simulation@2.3.4/de.unistuttgart.informatik.fius.icge.simulation.entity.GreedyEntity.drop(GreedyEntity.java:137)
    at de.unistuttgart.informatik.fius.jvk/de.unistuttgart.informatik.fius.jvk.provided.entity.Neo.dropCoin(Neo.java:58)
    at de.unistuttgart.informatik.fius.jvk/de.unistuttgart.informatik.fius.jvk.tasks.Sheet3Task1.run(Sheet3Task1.java:52)
    at de.unistuttgart.informatik.fius.icge.simulation@2.3.4/de.unistuttgart.informatik.fius.icge.simulation.internal.tasks.StandardTaskRunner.executeTask(StandardTaskRunner.java:75)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1764)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
    at java.base/java.lang.Thread.run(Thread.java:832)

steps to reproduce: collect a coin and drop it again

neumantm commented 4 years ago

Firxed by #189