Examples of RandomNameLoader


Examples of ch.sahits.game.openpatrician.util.RandomNameLoader

            IGame game = GameFactory.createGame(gameMap, obj, diff, gameSpeed, startyear);

           
            ICity homeCity = CityFactory.createCityByName(ECityName.values()[homeTownIndex]);
            IPlayer player = GameFactory.createPlayer(name.getValue(), lastName.getValue(), homeCity, male.isSelected() && !female.isSelected(),difficulity.getStartingCapital());
            RandomNameLoader shipLoader = new RandomNameLoader("shipnames.properties");
            IShip ship = ShipFactory.createCrayer(shipLoader.getRandomName(), EShipUpgrade.LEVEL1,3000); // TODO check the value
            player.addShip(ship);

            // Initialize the player
            new NewGameEvent(ENewGame.SINGELPLAYER).notify(player);
            // Initialize the game/server
View Full Code Here

Examples of ch.sahits.game.openpatrician.util.RandomNameLoader

          try {
            int homeTownIndex = home.getSelectedIndex();
            IMap gameMap = GameFactory.createMap(); // TODO consider custom maps
            ICity homeCity = CityFactory.createCityByName(ECityName.values()[homeTownIndex]);
            IPlayer player = GameFactory.createPlayer(name.getValue(), lastName.getValue(), homeCity, male.isSelected() && !female.isSelected(),difficulity.getStartingCapital());
            RandomNameLoader shipLoader = new RandomNameLoader("shipnames.properties");
            IShip ship = ShipFactory.createCrayer(shipLoader.getRandomName(), EShipUpgrade.LEVEL1);
            player.addShipp(ship);

            EObjective obj = EObjective.values()[objective.getSelectedIndex()];
            Difficulty diff = difficulity;
            EGameSpeed gameSpeed = EGameSpeed.values()[speed.getSelectedIndex()];
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.