SuperKaninchen / hamster-pathfinding

Pathfinding application for the "Java-Hamster Simulator/Modell"
GNU General Public License v3.0
3 stars 0 forks source link

How do i run this? #1

Closed gandie closed 4 years ago

gandie commented 4 years ago

I am very curious to see this working but i need held to get it running.

I downloaded the Hamster Simulator thingy and started it:

~/D/hamstersimulator-v29-06 $ java -jar hamstersimulator.jar

Then i moved this repo into the Programme folder, created a terrain file with one grain and adjusted PATH as README explains and tried to compile and run. Compiler keeps telling me Cannot find symbol, so tried to add package statements like documentation found here says. Still not able to compile and run :crying_cat_face: . Please help.

SuperKaninchen commented 4 years ago

Thanks for the report! Can you please tell me which file and which line causes the error or send a screenshot of the error message?

gandie commented 4 years ago

Well, i was able to get arround these errors by compiling all files in the correct order. I suggest you mention this in the README so hamster-noobs like me can play with your toys, too. But i encountered more problems afterwards:

if(strings[j] != null) {
    //result[i][j] = strings[j];
    result[j][i] = strings[j];
}

Now the hamster is finally running, but i think i broke something because in the end it does not stand on the grain field :laughing:

SuperKaninchen commented 4 years ago

Thanks for the reply! The security exception is caused by the Hamster Simulator. In order to give the Hamster Simulator access to files you have to edit the first line in the hamster.properties file and set security=false. I will add that part to the README of the repo. The ArrayIndexOutOfBoundsException is a known bug which i‘m currently working to fix asap. I will commit a fix as soon as it‘s ready.

SuperKaninchen commented 4 years ago

I just committed the new version which hopefully fixes your problems. If you try it out, please let me know if it worked!

gandie commented 4 years ago

Well after pulling latest master, recompiling and running, the hamster still does not reach the korn in the end. Seems like an off-by-one error or something because everything works well until the latest step which seems to always go upwards. This well even cause a WallInFrontException if the korn is placed in the first row of terrain.

SuperKaninchen commented 4 years ago

I noticed that issue too. I will open a new issue in this repo and refer to this one.

gandie commented 4 years ago

As the original problem has been solved this one can be closed now :rocket: