Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void populateRandomly()
- {
- // No one expects the lolplanets inquisition
- for (int i = 0; i < 75; i++) {
- final PlanetData randomPlanet = aState.getPlanetData((String) MathUtils.getRandomElement(aState.getPlanetTypes()));
- addElem(new Planet(aState.getRandomPlayer(), getRandomLocation(randomPlanet.getDimension()),
- randomPlanet.getType(), aState));
- }
- // All your lolships are belong to us
- for (int i = 0; i < 1; i++) {
- final Player randomP = aState.getRandomPlayer();
- final Player randomP2 = aState.getRandomPlayer();
- final RaceData race = randomP.getRaceData();
- final String shipType = (String) MathUtils.getRandomElement(race.getShipTypes());
- Ship tempShip = new Ship(randomP, getRandomLocation(race.getShipData(shipType).getDimension()), shipType, aState);
- addElem(tempShip);
- PathfindingManager pfm = new PathfindingManager();
- ArrayList<GridLocation> path = pfm.findPath(this, tempShip, new Point(0,0));
- for (GridLocation c : path){
- //tempShip = new Ship(randomP2, c, shipType, aState);
- //addElem(tempShip);
- if (c != null)
- System.out.println(c.toString());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment