package nautilus.game.arcade; import java.util.HashMap; import org.bukkit.ChatColor; import nautilus.game.arcade.game.Game; import nautilus.game.arcade.game.games.barbarians.Barbarians; import nautilus.game.arcade.game.games.bridge.Bridge; import nautilus.game.arcade.game.games.castlesiege.CastleSiege; import nautilus.game.arcade.game.games.deathtag.DeathTag; import nautilus.game.arcade.game.games.dragonescape.DragonEscape; import nautilus.game.arcade.game.games.dragons.Dragons; import nautilus.game.arcade.game.games.evolution.Evolution; import nautilus.game.arcade.game.games.milkcow.MilkCow; import nautilus.game.arcade.game.games.mineware.MineWare; import nautilus.game.arcade.game.games.quiver.Quiver; import nautilus.game.arcade.game.games.runner.Runner; import nautilus.game.arcade.game.games.smash.SuperSmash; import nautilus.game.arcade.game.games.snowfight.SnowFight; import nautilus.game.arcade.game.games.spleef.Spleef; import nautilus.game.arcade.game.games.turfforts.TurfForts; import nautilus.game.arcade.game.games.uhc.UHC; import nautilus.game.arcade.game.games.zombiesurvival.ZombieSurvival; public class GameFactory { private ArcadeManager _manager; public GameFactory(ArcadeManager gameManager) { _manager = gameManager; } public Game CreateGame(GameType gameType, HashMap pastTeams) { if (gameType == GameType.Barbarians) return new Barbarians(_manager); else if (gameType == GameType.Bridge) return new Bridge(_manager); else if (gameType == GameType.CastleSiege) return new CastleSiege(_manager, pastTeams); else if (gameType == GameType.DeathTag) return new DeathTag(_manager); else if (gameType == GameType.Dragons) return new Dragons(_manager); else if (gameType == GameType.DragonEscape) return new DragonEscape(_manager); else if (gameType == GameType.Evolution) return new Evolution(_manager); else if (gameType == GameType.MineWare) return new MineWare(_manager); else if (gameType == GameType.MilkCow) return new MilkCow(_manager); else if (gameType == GameType.Quiver) return new Quiver(_manager); else if (gameType == GameType.Runner) return new Runner(_manager); else if (gameType == GameType.SnowFight) return new SnowFight(_manager); else if (gameType == GameType.Smash) return new SuperSmash(_manager); else if (gameType == GameType.Spleef) return new Spleef(_manager); else if (gameType == GameType.TurfWars) return new TurfForts(_manager); else if (gameType == GameType.UHC) return new UHC(_manager); else if (gameType == GameType.ZombieSurvival) return new ZombieSurvival(_manager); else return null; } }