diff --git a/build.xml b/build.xml index a18872a..41c9d20 100644 --- a/build.xml +++ b/build.xml @@ -45,11 +45,14 @@ - + + + + diff --git a/project.properties b/project.properties index 8363b06..57598b1 100644 --- a/project.properties +++ b/project.properties @@ -1,7 +1,7 @@ -#Sun, 29 Aug 2010 22:59:56 -0500 +#Thu, 11 Oct 2012 22:22:39 -0500 #Mon Jul 05 23:10:39 CDT 2010 app.version=0.4.0 -build.number=36 +build.number=45 src.dir=src lib.dir=lib build.dir=build diff --git a/src/com/jdbernard/teammaker/PlayerListCellRenderer.groovy b/src/com/jdbernard/teammaker/PlayerListCellRenderer.groovy index 8a3d1b9..b077220 100644 --- a/src/com/jdbernard/teammaker/PlayerListCellRenderer.groovy +++ b/src/com/jdbernard/teammaker/PlayerListCellRenderer.groovy @@ -58,7 +58,7 @@ public class PlayerListCellRenderer extends JPanel implements ListCellRenderer { else setBorder(emptyBorder) if (showStats) { - def odds = teamMaker.oddsCalculator.odds[(value)] + def odds = teamMaker.model.oddsCalculator.odds[(value)] odds = odds ? Math.round(odds * 100) : "?" statsLabel.text = "${value.gamesSat} (${odds}%)" } diff --git a/src/com/jdbernard/teammaker/ProfessionalPickup.groovy b/src/com/jdbernard/teammaker/ProfessionalPickup.groovy index 254ad2d..35fbaf6 100644 --- a/src/com/jdbernard/teammaker/ProfessionalPickup.groovy +++ b/src/com/jdbernard/teammaker/ProfessionalPickup.groovy @@ -161,7 +161,7 @@ public class ProfessionalPickup { constraints: gbc(gridx: 0, gridy: 2, anchor: GBC.CENTER, insets: [5, 5, 5, 0]), enabled: bind { model.inGame }, - actionPerformed: { declareLoser(2)}) + actionPerformed: { declareLoser(TEAM2)}) view.team2List = list(cellRenderer: teamListRenderer, constraints: gbc(gridx: 1, gridy: 1, fill: GBC.BOTH, @@ -176,7 +176,7 @@ public class ProfessionalPickup { constraints: gbc(gridx: 1, gridy: 2, anchor: GBC.CENTER, insets: [5, 5, 5, 5]), enabled: bind { model.inGame }, - actionPerformed: { declareLoser(1)} ) + actionPerformed: { declareLoser(TEAM1)} ) } @@ -193,8 +193,9 @@ public class ProfessionalPickup { }) } - button('Next Game', constraints: gbc(gridx: 0, gridy: 1, - anchor: GBC.CENTER, insets: [5, 5, 5, 0]), + view.newGameButton = button('Next Game', + constraints: gbc(gridx: 0, gridy: 1, + anchor: GBC.CENTER, insets: [5, 5, 5, 0]), enabled: bind { !model.inGame}, actionPerformed: { newGame() }) @@ -202,13 +203,12 @@ public class ProfessionalPickup { anchor: GBC.CENTER, insets: [5, 5, 5, 0]), actionPerformed: { addPlayer() }) - view.newGameButton = button('Delete Player', + button('Delete Player', constraints: gbc(gridx: 2, gridy: 1, anchor: GBC.CENTER, insets: [5, 5, 5, 5]), actionPerformed: { model.sittingPlayers.remove(view.sittingList.selectedValues) refreshGUI() }) - } } @@ -232,7 +232,7 @@ public class ProfessionalPickup { '.teammakerrc') if (!teammakerrc.exists()) getClass().getResourceAsStream('/default-teammakerrc') - .withInputStream { is -> teammakerrc.text = is.text } + .withStream { is -> teammakerrc.text = is.text } // load config teammakerrc.withInputStream { model.config.load(it) } @@ -282,10 +282,10 @@ public class ProfessionalPickup { private void newGame() { if (model.team1Players.size() < model.teamSize) - populate(1) + populate(TEAM1) if (model.team2Players.size() < model.teamSize) - populate(2) + populate(TEAM2) recalculateOdds() @@ -418,12 +418,12 @@ public class ProfessionalPickup { } private List playersForTeam(Game.Team team) { - if (team == Game.Team.TEAM1) return model.team1Players + if (team == TEAM1) return model.team1Players else return model.team2Players } private List listForTeam(Game.Team team) { - if (team == Game.Team.TEAM11) return view.team1List + if (team == TEAM1) return view.team1List else return view.team2List } }