Lux Delux AI Secondary Class Build Question
Posted: Sun Apr 12, 2020 1:38 am
I recently got this game and am starting to work on an AI bot. That's one of the cooler features of this game and part of the reason why I chose to get it. I have the SDK downloaded and made a simple Hello World-style bot that doesn't do much, but it confirmed that I can get a bot to run and attack.
The issue I have is I cannot figure how to create and use another class in my bot. I had my bot BigBadBot.java. Now I want to create a class called LuxGraph.java. The code compiles, but I always get this stack trace
Some things I tried: include the code for the LuxGraph class in BigBadBot.java. Didn't work, got the same result.
Then, I made LuxGraph a nested class within BigBadBot. Also didn't work. I don't see why it would not work now, because it's inside BigBadBot so shouldn't that code be included when Lux runs BigBadBot?
The issue I have is I cannot figure how to create and use another class in my bot. I had my bot BigBadBot.java. Now I want to create a class called LuxGraph.java. The code compiles, but I always get this stack trace
Code: Select all
java.lang.NoClassDefFoundError: com/sillysoft/lux/agent/BigBoyBot$LuxGraph
at com.sillysoft.lux.agent.BigBoyBot.placeArmies(BigBoyBot.java:44)
at com.sillysoft.lux.B.T(Unknown Source)
at com.sillysoft.lux.B.h(Unknown Source)
at com.sillysoft.lux.B.P(Unknown Source)
at com.sillysoft.lux.B.run(Unknown Source)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException
at com.sillysoft.lux.L.loadClass(Unknown Source)
at com.sillysoft.lux.L.loadClass(Unknown Source)
... 6 more
Then, I made LuxGraph a nested class within BigBadBot. Also didn't work. I don't see why it would not work now, because it's inside BigBadBot so shouldn't that code be included when Lux runs BigBadBot?