From cb724eaf5117db97511d1abb80eceb225cd7e48d Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Fri, 27 Aug 2010 03:13:23 -0500 Subject: [PATCH] Small comments. --- project.properties | 4 ++-- src/com/jdbernard/teammaker/TeamMaker.groovy | 15 ++++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/project.properties b/project.properties index b06a14b..1d49ae9 100644 --- a/project.properties +++ b/project.properties @@ -1,7 +1,7 @@ -#Wed, 25 Aug 2010 09:05:51 -0500 +#Fri, 27 Aug 2010 03:12:12 -0500 #Mon Jul 05 23:10:39 CDT 2010 app.version=0.4.0 -build.number=2 +build.number=3 src.dir=src lib.dir=lib build.dir=build diff --git a/src/com/jdbernard/teammaker/TeamMaker.groovy b/src/com/jdbernard/teammaker/TeamMaker.groovy index f098d80..4c4c620 100644 --- a/src/com/jdbernard/teammaker/TeamMaker.groovy +++ b/src/com/jdbernard/teammaker/TeamMaker.groovy @@ -18,13 +18,14 @@ public class TeamMaker { public static def swing = new SwingBuilder() public static final String version = "0.4" - def frame - def team1List - def team2List - def team1WinsButton + // GUI Components + def frame // main frame + def team1List // JList for team 1 + def team2List // JList for team 2 + def team1WinsButton def team2WinsButton def newGameButton - def sittingList + def sittingList // JList for sitting players def inGamePlayerDropMenu def sittingPlayerDropMenu @@ -34,6 +35,7 @@ public class TeamMaker { PlayerChooser playerChooser = new WeightedChooser(hardLimit: 2) OddsCalculator oddsCalculator = new OddsCalculator() + // Data components class Observables { @Bindable List team1Players = [] @Bindable List team2Players = [] @@ -197,6 +199,9 @@ public class TeamMaker { init() } + /** + * @return the number of players needed to round out even teams. + */ public int getSpotsOpen() { def spots = (model.teamSize - model.team1Players.size()) + (model.teamSize - model.team2Players.size())