Codota Logo
PlayerList
Code IndexAdd Codota to your IDE (free)

How to use
PlayerList
in
ch.sahits.game.openpatrician.model

Best Java code snippets using ch.sahits.game.openpatrician.model.PlayerList (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: ch.sahits.game/OpenPatricianEngine

List<IPlayer> getHumanPlayers() {
  return players.stream().filter(p -> p instanceof IHumanPlayer).collect(Collectors.toList());
}
@Subscribe
origin: ch.sahits.game/OpenPatricianClientServerInterface

/**
 * Create a human player instance. Build their trading office in the home town as well.
 * @param name first name of the player
 * @param lastName last name of the player
 * @param homeTown reference to the player's hometown
 * @param male flag indicating if the player is male
 * @param cash initial cash amount of the player
 * @param color player color
 * @return Human player instance
 */
public IHumanPlayer createPlayer(String name, String lastName, ICity homeTown, boolean male, int cash, EPlayerColor color) {
  int age = rnd.nextInt(10)+17;
  PersonalData pd = new PersonalData(name, lastName, male, homeTown, computeRandomBirthDate(age));
  Company company = createCompany(homeTown, cash);
  IHumanPlayer player = (IHumanPlayer) context.getBean("humanPlayer", new Object[]{homeTown, pd,ESocialRank.CHANDLER, company, color});
  company.setOwner(player);
  ITradingOffice office = buildingFactory.createTradingOffice(player, homeTown, 0); // initial trading office has no value
  offices.add(office);
  initPlayerInCities(player);
  players.add(player);
  return player;
}
/**
origin: ch.sahits.game/OpenPatricianClientServerInterface

context.add(shipUpgradeStrategies.get(rnd.nextInt(shipUpgradeStrategies.size())));
players.add(player);
aiPlayers.add(player);
return player;
ch.sahits.game.openpatrician.modelPlayerList

Most used methods

  • add
  • stream

Popular in Java

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • onCreateOptionsMenu (Activity)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now