[gee-svn] SF.net SVN: gabel: [190] trunk/gee/src/java/edu/indiana/psych/gee/event
Status: Alpha
Brought to you by:
alllee
|
From: <al...@us...> - 2006-06-18 22:56:12
|
Revision: 190 Author: alllee Date: 2006-06-18 15:56:07 -0700 (Sun, 18 Jun 2006) ViewCVS: http://svn.sourceforge.net/gabel/?rev=190&view=rev Log Message: ----------- minor javadoc hygiene + rudimentary main method for ForagerExperiment. Modified Paths: -------------- trunk/gee/src/java/edu/indiana/psych/gee/event/BeginExperimentRequest.java trunk/gee/src/java/edu/indiana/psych/gee/forager/ForagerExperiment.java trunk/gee/src/java/edu/indiana/psych/gee/forager/GridView.java Modified: trunk/gee/src/java/edu/indiana/psych/gee/event/BeginExperimentRequest.java =================================================================== --- trunk/gee/src/java/edu/indiana/psych/gee/event/BeginExperimentRequest.java 2006-06-18 22:51:45 UTC (rev 189) +++ trunk/gee/src/java/edu/indiana/psych/gee/event/BeginExperimentRequest.java 2006-06-18 22:56:07 UTC (rev 190) @@ -7,8 +7,8 @@ /** * $Id$ * - * Used by the facilitator to signal the ForagerServer that we are done - * collecting clients and ready to start the next experiment. + * Used by the facilitator to signal that we are done collecting clients and + * ready to start the next experiment. * * * @author Allen Lee Modified: trunk/gee/src/java/edu/indiana/psych/gee/forager/ForagerExperiment.java =================================================================== --- trunk/gee/src/java/edu/indiana/psych/gee/forager/ForagerExperiment.java 2006-06-18 22:51:45 UTC (rev 189) +++ trunk/gee/src/java/edu/indiana/psych/gee/forager/ForagerExperiment.java 2006-06-18 22:56:07 UTC (rev 190) @@ -10,6 +10,8 @@ import java.util.Set; import java.util.SortedSet; +import org.springframework.context.support.ClassPathXmlApplicationContext; + import edu.indiana.psych.gee.AbstractExperiment; import edu.indiana.psych.gee.Identifier; import edu.indiana.psych.gee.agent.Agent; @@ -26,7 +28,6 @@ import edu.indiana.psych.gee.net.Dispatcher; import edu.indiana.psych.gee.net.event.ClientReadyEvent; import edu.indiana.psych.gee.net.event.ConnectionEvent; -import edu.indiana.psych.gee.service.ExperimentConfigurationService; import edu.indiana.psych.gee.time.Duration; import edu.indiana.psych.gee.util.GeeUtils; @@ -313,7 +314,7 @@ currentRoundDuration = parameters.getRoundDuration().start(); foragerGameState = new ForagerServerGameState(getEventChannel(), parameters); // foragerGameState.setBoardSize(currentExperimentConfiguration); - persister = new ForagerPersister(parameters); + persister = new ForagerPersister(getEventChannel(), parameters); // loop through once and populate the ForagerGameState so that each // and every participant has an initial starting position. for (Identifier id: currentParticipantHeadings.keySet()) { @@ -472,4 +473,12 @@ persister.clear(); } + public static void main(String[] args) { + ClassPathXmlApplicationContext appContext = + new ClassPathXmlApplicationContext("applicationContext.xml"); + ForagerExperiment experiment = + (ForagerExperiment) appContext.getBean("forager-web"); + experiment.start(); + } + } Modified: trunk/gee/src/java/edu/indiana/psych/gee/forager/GridView.java =================================================================== --- trunk/gee/src/java/edu/indiana/psych/gee/forager/GridView.java 2006-06-18 22:51:45 UTC (rev 189) +++ trunk/gee/src/java/edu/indiana/psych/gee/forager/GridView.java 2006-06-18 22:56:07 UTC (rev 190) @@ -71,7 +71,6 @@ // XXX: images still aren't fully loaded. When you actually invoke // drawImage on these images, make sure to pass this in so that when the // imageUpdate callback is invoked a repaint happens. - URL location = null; try { URLClassLoader imageLoader = URLClassLoader.newInstance(new URL[] { new URL("http", "groups.psych.indiana.edu", "/gee/images/forager-v2/") }); foodImage1 = toolkit.getImage(imageLoader.findResource("grass-1.gif")); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |