Small comments.

This commit is contained in:
Jonathan Bernard
2010-08-27 03:13:23 -05:00
parent 1dc9bb2a4a
commit cb724eaf51
2 changed files with 12 additions and 7 deletions

View File

@ -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())