diff --git a/.gitignore b/.gitignore index 843dd80aae..7b56e3002b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,74 +1,75 @@ -syntax: glob -Mage.Client/*.dck -Mage.Client/db -Mage.Client/gamelogs -Mage.Client/mageclient.log -Mage.Client/plugins/images -Mage.Client/plugins/plugin.data -Mage.Client/target -Mage.Common/target -Mage.Plugins/Mage.Card.Plugin/target -Mage.Plugins/Mage.Counter.Plugin/target -Mage.Plugins/Mage.Theme.Plugin/target -Mage.Plugins/Mage.Rating.Plugin/target -Mage.Server.Console/target/ -Mage.Server.Plugins/Mage.Deck.Constructed/target -Mage.Server.Plugins/Mage.Deck.Limited/target -Mage.Server.Plugins/Mage.Game.CommanderDuel/target -Mage.Server.Plugins/Mage.Game.FreeForAll/target -Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/target -Mage.Server.Plugins/Mage.Player.AI/target -Mage.Server.Plugins/Mage.Player.AIMinimax/target -Mage.Server.Plugins/Mage.Player.AI.MA/target -Mage.Server.Plugins/Mage.Player.AIMCTS/target -Mage.Server.Plugins/Mage.Player.Human/target -Mage.Server.Plugins/Mage.Draft.8PlayerBooster/target -Mage.Server.Plugins/Mage.Tournament.BoosterDraft/target -Mage.Server.Plugins/Mage.Tournament.Sealed/target -Mage.Server.Plugins/Mage.Player.AI.DraftBot/target -Mage.Server/config/init.txt -Mage.Server/saved -Mage.Server/target -Mage.Server/db -Mage.Server/cache -Mage.Server/mageserver.log -Mage.Sets/target -Mage.Tests/target -Mage.Tests/cache -Mage.Tests/db -Mage.Tests/Mage.log -Mage.Tests/watchdog.log -Mage/target -Mage.Updater/target -mage.updater.client/target - -releases -Utils/author.txt -.metadata -.project -.settings -.idea -syntax: regexp -\.class -\.jar -\.iml -\.ipr -\.iws -\.log -nbactions.xml -nbactions-*.xml -nb-configuration.xml -glob:Mage.Client/cheat.dck -glob:Mage.Client/test.dck - -Mage.Server.Plugins/Mage.Draft.8PlayerBooster/target -\.orig\..*$ -\.orig$ -\.chg\..*$ -\.rej$ -\.conflict\~$ -/Mage.Server.Plugins/Mage.Player.AIMCTS/target/ -/Mage.Server.Console/target/ -*.classpath -*.iml -/submitted +syntax: glob +Mage.Client/*.dck +Mage.Client/db +Mage.Client/gamelogs +Mage.Client/mageclient.log +Mage.Client/plugins/images +Mage.Client/plugins/plugin.data +Mage.Client/target +Mage.Common/target +Mage.Plugins/Mage.Card.Plugin/target +Mage.Plugins/Mage.Counter.Plugin/target +Mage.Plugins/Mage.Theme.Plugin/target +Mage.Plugins/Mage.Rating.Plugin/target +Mage.Server.Console/target/ +Mage.Server.Plugins/Mage.Deck.Constructed/target +Mage.Server.Plugins/Mage.Deck.Limited/target +Mage.Server.Plugins/Mage.Game.CommanderDuel/target +Mage.Server.Plugins/Mage.Game.FreeForAll/target +Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/target +Mage.Server.Plugins/Mage.Player.AI/target +Mage.Server.Plugins/Mage.Player.AIMinimax/target +Mage.Server.Plugins/Mage.Player.AI.MA/target +Mage.Server.Plugins/Mage.Player.AIMCTS/target +Mage.Server.Plugins/Mage.Player.Human/target +Mage.Server.Plugins/Mage.Draft.8PlayerBooster/target +Mage.Server.Plugins/Mage.Tournament.BoosterDraft/target +/Mage.Server.Plugins/Mage.Tournament.Constructed/target +Mage.Server.Plugins/Mage.Tournament.Sealed/target +Mage.Server.Plugins/Mage.Player.AI.DraftBot/target +Mage.Server/config/init.txt +Mage.Server/saved +Mage.Server/target +Mage.Server/db +Mage.Server/cache +Mage.Server/mageserver.log +Mage.Sets/target +Mage.Tests/target +Mage.Tests/cache +Mage.Tests/db +Mage.Tests/Mage.log +Mage.Tests/watchdog.log +Mage/target +Mage.Updater/target +mage.updater.client/target + +releases +Utils/author.txt +.metadata +.project +.settings +.idea +syntax: regexp +\.class +\.jar +\.iml +\.ipr +\.iws +\.log +nbactions.xml +nbactions-*.xml +nb-configuration.xml +glob:Mage.Client/cheat.dck +glob:Mage.Client/test.dck + +Mage.Server.Plugins/Mage.Draft.8PlayerBooster/target +\.orig\..*$ +\.orig$ +\.chg\..*$ +\.rej$ +\.conflict\~$ +/Mage.Server.Plugins/Mage.Player.AIMCTS/target/ +/Mage.Server.Console/target/ +*.classpath +*.iml +/submitted diff --git a/Mage.Server.Plugins/Mage.Tournament.Constructed/pom.xml b/Mage.Server.Plugins/Mage.Tournament.Constructed/pom.xml new file mode 100644 index 0000000000..7f198338e0 --- /dev/null +++ b/Mage.Server.Plugins/Mage.Tournament.Constructed/pom.xml @@ -0,0 +1,50 @@ + + + + 4.0.0 + + + org.mage + mage-server-plugins + 1.1.0 + + + mage-tournament-constructed + jar + Mage Tournament Constructed + + + + ${project.groupId} + mage + ${project.version} + + + + + src + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.6 + 1.6 + + + + maven-resources-plugin + + UTF-8 + + + + + + mage-tournament-constructed + + + + + \ No newline at end of file diff --git a/Mage.Server.Plugins/Mage.Tournament.Constructed/src/mage/tournament/ConstructedEliminationTournament.java b/Mage.Server.Plugins/Mage.Tournament.Constructed/src/mage/tournament/ConstructedEliminationTournament.java new file mode 100644 index 0000000000..f33f9aaf92 --- /dev/null +++ b/Mage.Server.Plugins/Mage.Tournament.Constructed/src/mage/tournament/ConstructedEliminationTournament.java @@ -0,0 +1,66 @@ +/* + * Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.tournament; + +import mage.game.tournament.TournamentOptions; +import mage.game.tournament.TournamentSingleElimination; + +/** + * + * @author LevelX2 + */ +public class ConstructedEliminationTournament extends TournamentSingleElimination { + + protected enum TournamentStep { + START, COMPETE, WINNERS + } + + protected TournamentStep currentStep; + + public ConstructedEliminationTournament(TournamentOptions options) { + super(options); + currentStep = TournamentStep.START; + } + + @Override + public void nextStep() { + switch (currentStep) { + case START: + currentStep = TournamentStep.COMPETE; + runTournament(); + break; + case COMPETE: + currentStep = TournamentStep.WINNERS; + winners(); + end(); + break; + } + } + +} diff --git a/Mage.Server.Plugins/Mage.Tournament.Constructed/src/mage/tournament/ConstructedEliminationTournamentType.java b/Mage.Server.Plugins/Mage.Tournament.Constructed/src/mage/tournament/ConstructedEliminationTournamentType.java new file mode 100644 index 0000000000..4afb70a7c1 --- /dev/null +++ b/Mage.Server.Plugins/Mage.Tournament.Constructed/src/mage/tournament/ConstructedEliminationTournamentType.java @@ -0,0 +1,47 @@ +/* + * Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.tournament; + +import mage.game.tournament.TournamentType; + +/** + * + * @author LevelX2 + */ + +public class ConstructedEliminationTournamentType extends TournamentType { + + public ConstructedEliminationTournamentType() { + this.name = "Elimination Constructed"; + this.maxPlayers = 16; + this.minPlayers = 4; + this.numBoosters = 0; + this.draft = false; + this.limited = false; + } +} diff --git a/Mage.Server.Plugins/Mage.Tournament.Sealed/src/mage/tournament/SealedEliminationTournament.java b/Mage.Server.Plugins/Mage.Tournament.Sealed/src/mage/tournament/SealedEliminationTournament.java index d3079d976d..cdf4b5ad53 100644 --- a/Mage.Server.Plugins/Mage.Tournament.Sealed/src/mage/tournament/SealedEliminationTournament.java +++ b/Mage.Server.Plugins/Mage.Tournament.Sealed/src/mage/tournament/SealedEliminationTournament.java @@ -28,9 +28,7 @@ package mage.tournament; -import mage.constants.TournamentPlayerState; import mage.game.tournament.TournamentOptions; -import mage.game.tournament.TournamentPlayer; import mage.game.tournament.TournamentSingleElimination; /** diff --git a/Mage.Server.Plugins/pom.xml b/Mage.Server.Plugins/pom.xml index 04c96af5ab..1d26755a65 100644 --- a/Mage.Server.Plugins/pom.xml +++ b/Mage.Server.Plugins/pom.xml @@ -1,33 +1,34 @@ - - - - 4.0.0 - - - org.mage - mage-root - 1.1.0 - - - mage-server-plugins - pom - Mage Server Plugins - Mage Server Plugins POM - - - Mage.Deck.Constructed - Mage.Deck.Limited - Mage.Game.CommanderDuel - Mage.Game.FreeForAll - Mage.Game.TwoPlayerDuel - Mage.Player.AI - Mage.Player.AIMinimax - Mage.Player.AI.MA - Mage.Player.AIMCTS - Mage.Player.AI.DraftBot - Mage.Player.Human - Mage.Tournament.BoosterDraft - Mage.Tournament.Sealed - - + + + + 4.0.0 + + + org.mage + mage-root + 1.1.0 + + + mage-server-plugins + pom + Mage Server Plugins + Mage Server Plugins POM + + + Mage.Deck.Constructed + Mage.Deck.Limited + Mage.Game.CommanderDuel + Mage.Game.FreeForAll + Mage.Game.TwoPlayerDuel + Mage.Player.AI + Mage.Player.AIMinimax + Mage.Player.AI.MA + Mage.Player.AIMCTS + Mage.Player.AI.DraftBot + Mage.Player.Human + Mage.Tournament.BoosterDraft + Mage.Tournament.Constructed + Mage.Tournament.Sealed + + \ No newline at end of file diff --git a/Mage.Server/pom.xml b/Mage.Server/pom.xml index abfabb156d..9fc2452f09 100644 --- a/Mage.Server/pom.xml +++ b/Mage.Server/pom.xml @@ -111,6 +111,12 @@ ${project.version} runtime + + ${project.groupId} + mage-tournament-constructed + ${project.version} + runtime + ${project.groupId} mage-player-ai-draftbot