Package ch.fusun.baron.player

Examples of ch.fusun.baron.player.Player


  /**
   * Tests the scenario without children and without spouse
   */
  @Test
  public void testSimple() {
    Player person = new Player(0, "Albert", Gender.MALE);
    Country country = new Country(0, "Country");
    propertyService.setOwnership(person, country);
    reinject();
    turntask.execute();
    assertNotNull("The country should be owned",
View Full Code Here


  @Override
  public void execute() {
    for (City city : cityService.getCities()) {
      Country country = (Country) propertyService
          .getOwnership(cityService.getLocation(city));
      Player owner = (Player) propertyService.getOwnership(country);
      treasuryService.addMoney(playerService.getDynasty(owner),
          MONEY_PER_CITY * city.getPopulation());
    }
  }
 
View Full Code Here

    Dynasty dynasty = new Dynasty(
        userDynastyMap.get(user) == null ? user.getName()
            : userDynastyMap.get(user), userCOADynastyMap.get(user));
    Country country = countryService
        .createCountry(userDynastyMap.get(user));
    Player man = playerService.generateNewPlayer(Gender.MALE);
    man.setAge(INITIAL_AGE_MAN);
    Player woman = playerService.generateNewPlayer(Gender.FEMALE);
    woman.setAge(INITIAL_AGE_WOMAN);
    dynasty.addPlayer(man);
    dynasty.addPlayer(woman);
    marriageService.marry(man, woman);
    playerService.setDynastyForUser(dynasty, user);
    propertyService.setOwnership(man, country);
View Full Code Here

TOP

Related Classes of ch.fusun.baron.player.Player

Copyright © 2018 www.massapicom. 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.