setPrefs() getting skipped?
-
- Lux Newbie
- Posts: 4
- Joined: Tue Oct 13, 2009 6:09 pm
- Location: Austin
setPrefs() getting skipped?
I'm working on an agent that extends the SmartAgentBase. Until now I haven't bothered with the setPrefs() method because SmartAgentBase has its own...but when I just added in my own version of setPrefs(), it seems that it's not ever getting called!
I'm not sure how to ensure that my version of setPrefs() gets called.
Thanks in advance for your help.
I'm not sure how to ensure that my version of setPrefs() gets called.
Thanks in advance for your help.
-
- Lux Newbie
- Posts: 4
- Joined: Tue Oct 13, 2009 6:09 pm
- Location: Austin
According to the documentation, I would expect that the game would be calling something like
myAgent.setPrefs();
after my agent gets constructed. This would allow it to default to SmartAgentBase.setPrefs() before I wrote my own. Once I write my own, it should be using myAgent's version, and printing out a simple message to the log (because of my code).
myAgent.setPrefs();
after my agent gets constructed. This would allow it to default to SmartAgentBase.setPrefs() before I wrote my own. Once I write my own, it should be using myAgent's version, and printing out a simple message to the log (because of my code).
hmm... make sure that you're matching the method signature, including the 2 parameters.
If you have this exact method in your agent, it should get called:
If you have this exact method in your agent, it should get called:
Code: Select all
public void setPrefs( int newID, Board theboard )
Who is online
Users browsing this forum: No registered users and 43 guests