[virtualcommons-svn] commit/foraging: alllee: moving dollarsPerToken into the ServerConfiguration a
Status: Beta
Brought to you by:
alllee
From: Bitbucket <com...@bi...> - 2011-12-14 23:51:20
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/3d41176b27e1/ changeset: 3d41176b27e1 user: alllee date: 2011-12-15 00:51:15 summary: moving dollarsPerToken into the ServerConfiguration as well and having RoundConfiguration defer to it in the event that it's not set in the round configuration. Adding dollar defaults to the stockholm censored chat configuration so Micael knows where to modify them. May also need to have a configuration parameter / localization issue to switch from dollars to krona. affected #: 3 files diff -r 6901d927ccc1366ae4556829dda17cda64518b40 -r 3d41176b27e1e91a9520889a74d69a6a3639f813 src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java --- a/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java +++ b/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java @@ -46,14 +46,10 @@ private static final int DEFAULT_SANCTION_FLASH_DURATION = 3; - private static final double DEFAULT_DOLLARS_PER_TOKEN = .02d; - private static final double DEFAULT_TOKEN_MOVEMENT_PROBABILITY = 0.2d; private static final double DEFAULT_TOKEN_BIRTH_PROBABILITY = 0.01d; - - public double getTrustGamePayoffIncrement() { return getDoubleProperty("trust-game-payoff", 0.25d); } @@ -281,7 +277,7 @@ } public double getDollarsPerToken() { - return getDoubleProperty("dollars-per-token", DEFAULT_DOLLARS_PER_TOKEN); + return getDoubleProperty("dollars-per-token", getParentConfiguration().getDollarsPerToken()); } /** diff -r 6901d927ccc1366ae4556829dda17cda64518b40 -r 3d41176b27e1e91a9520889a74d69a6a3639f813 src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java --- a/src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java +++ b/src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java @@ -24,7 +24,8 @@ private static final long serialVersionUID = -1737412253553943902L; private final static String DEFAULT_LOG_FILE_DESTINATION = "foraging-server.log"; - + private static final double DEFAULT_DOLLARS_PER_TOKEN = .02d; + public ServerConfiguration() { super(); } @@ -91,5 +92,9 @@ public boolean shouldAskForSurveyId() { return getBooleanProperty("survey-id-enabled"); } + + public double getDollarsPerToken() { + return DEFAULT_DOLLARS_PER_TOKEN; + } } diff -r 6901d927ccc1366ae4556829dda17cda64518b40 -r 3d41176b27e1e91a9520889a74d69a6a3639f813 src/main/resources/configuration/stockholm/censored-chat/server.xml --- a/src/main/resources/configuration/stockholm/censored-chat/server.xml +++ b/src/main/resources/configuration/stockholm/censored-chat/server.xml @@ -11,6 +11,8 @@ <entry key="round4">round4.xml</entry><entry key="round5">round5.xml</entry><entry key="round6">round6.xml</entry> +<entry key='show-up-payment'>10.0</entry> +<entry key='show-up-payment'>0.02</entry><entry key="wait-for-participants">true</entry><entry key="number-of-rounds">7</entry><entry key="facilitator-instructions"> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |