[gee-cvs] gabel/src/net/sf/gabel/social/events ExperimentStateEvent.java, NONE, 1.1 URIEvent.java,
Status: Alpha
Brought to you by:
alllee
Update of /cvsroot/gabel/gabel/src/net/sf/gabel/social/events In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv32083/src/net/sf/gabel/social/events Modified Files: GameStartEvent.java EnterEvent.java GameEndEvent.java Added Files: ExperimentStateEvent.java URIEvent.java Removed Files: GameEndEvent2.java Log Message: Stable Social client/server. Many small bugfixes, features * and featurelettes to the client/server pair and to * individual experiments as well. --- NEW FILE: ExperimentStateEvent.java --- package net.sf.gabel.social.events; import net.sf.gabel.event.AbstractEvent; import net.sf.gabel.util.Identifier; public class ExperimentStateEvent extends AbstractEvent { /** * */ private static final long serialVersionUID = -2406649664421495663L; private int queued; private int ready; private int gameNumber; private int totalGames; public int getGameNumber () { return gameNumber; } public void setGameNumber (int gameNumber) { this.gameNumber = gameNumber; } public int getTotalGames () { return totalGames; } public void setTotalGames (int totalGames) { this.totalGames = totalGames; } public ExperimentStateEvent(Identifier id) { super(id); } public int getQueued () { return queued; } public void setQueued (int queued) { this.queued = queued; } public int getReady () { return ready; } public void setReady (int ready) { this.ready = ready; } } --- GameEndEvent2.java DELETED --- Index: EnterEvent.java =================================================================== RCS file: /cvsroot/gabel/gabel/src/net/sf/gabel/social/events/EnterEvent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EnterEvent.java 27 Dec 2005 01:38:06 -0000 1.2 --- EnterEvent.java 24 Jun 2006 23:45:33 -0000 1.3 *************** *** 19,33 **** private static final long serialVersionUID = 3625679040116622549L; ! /* ! * Whether the client wants to be a monitor or not ! */ private boolean isMonitor; ! public EnterEvent(Identifier id, boolean asMonitor) { super(id); ! // TODO perform some authorisation ! isMonitor = asMonitor; } public boolean isMonitor() { return isMonitor; --- 19,41 ---- private static final long serialVersionUID = 3625679040116622549L; ! private String name; ! private int age; private boolean isMonitor; ! public EnterEvent(Identifier id, String name, int age, boolean isMonitor) { super(id); ! this.name = name; ! this.age = age; ! this.isMonitor = isMonitor; ! } ! ! public String getName() { ! return name; } + public int getAge() { + return age; + } + public boolean isMonitor() { return isMonitor; --- NEW FILE: URIEvent.java --- package net.sf.gabel.social.events; import java.net.URI; import net.sf.gabel.event.AbstractEvent; import net.sf.gabel.util.Identifier; public class URIEvent extends AbstractEvent { private URI uri; public URIEvent(Identifier id, URI uri) { super(id); this.uri = uri; } public URI getURI() { return uri; } } Index: GameEndEvent.java =================================================================== RCS file: /cvsroot/gabel/gabel/src/net/sf/gabel/social/events/GameEndEvent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GameEndEvent.java 27 Feb 2006 04:54:51 -0000 1.2 --- GameEndEvent.java 24 Jun 2006 23:45:33 -0000 1.3 *************** *** 18,31 **** */ public class GameEndEvent extends AbstractEvent { - /** - * - */ private static final long serialVersionUID = 7789265661409021876L; private Guess bestGuess; private Answer bestAnswer; public GameEndEvent(Identifier id, Guess bestGuess, Answer bestAnswer) { super(id); - this.bestGuess = bestGuess; this.bestAnswer = bestAnswer; --- 18,32 ---- */ public class GameEndEvent extends AbstractEvent { private static final long serialVersionUID = 7789265661409021876L; + + public static final int ACTION_DEBRIEF = 0; + public static final int ACTION_REVIEW = 1; + private Guess bestGuess; private Answer bestAnswer; + private int action = ACTION_DEBRIEF; public GameEndEvent(Identifier id, Guess bestGuess, Answer bestAnswer) { super(id); this.bestGuess = bestGuess; this.bestAnswer = bestAnswer; *************** *** 39,41 **** --- 40,50 ---- return this.bestAnswer; } + + public void setAction(int action) { + this.action = action; + } + + public int getAction() { + return action; + } } Index: GameStartEvent.java =================================================================== RCS file: /cvsroot/gabel/gabel/src/net/sf/gabel/social/events/GameStartEvent.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GameStartEvent.java 27 Feb 2006 04:54:51 -0000 1.3 --- GameStartEvent.java 24 Jun 2006 23:45:33 -0000 1.4 *************** *** 21,31 **** private static final long serialVersionUID = 4977962323718855965L; ! private int roundLength = 0; ! public boolean isMonitored; public GameStartEvent(Identifier id) { super(id); } public void setRoundLength (int i) { roundLength = i; --- 21,41 ---- private static final long serialVersionUID = 4977962323718855965L; ! private int roundLength; ! private int totalParticipants; ! private boolean monitored; + public GameStartEvent(Identifier id) { super(id); } + public void setMonitored(boolean monitored) { + this.monitored = monitored; + } + + public boolean isMonitored() { + return monitored; + } + public void setRoundLength (int i) { roundLength = i; *************** *** 36,38 **** --- 46,56 ---- } + public void setTotalParticipants(int total) { + totalParticipants = total; + } + + public int getTotalParticipants() { + return totalParticipants; + } + } |