Android Open Source - rpg Level






From Project

Back to project page rpg.

License

The source code is released under:

Apache License

If you think the Android project rpg listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.aschyiel.rpg.level;
/*from  w w w.j  a va  2  s.co m*/
import java.util.ArrayList;
import java.util.List;
import java.util.ListIterator;

/**
* Describes a single level within the game;
* To be serialized.
* Supposed to be read-only to the outside world.
*/
public class Level
{

  private final List<LevelDetail> units;
  private final List<LevelDetail> lands;
  private final int boardRows;
  private final int boardColumns;

  public Level()
  {
    this( 4, 5 );
  }
  public Level( int rows, int columns )
  {
    units = new ArrayList<LevelDetail>();
    lands = new ArrayList<LevelDetail>();

    // TODO: Don't hardcode.
    boardRows    = rows;
    boardColumns = columns;
  }

  //
  // TODO: Remove these list-getters vs. serialization.
  //

  public List<LevelDetail> getUnits()
  {
    return units;
  }

  public List<LevelDetail> getLands()
  {
    return lands;
  }

  public ListIterator<LevelDetail> getUnitsIterator()
  {
    return units.listIterator();
  }

  public int getBoardRows()
  {
    return boardRows;
  }

  public int getBoardColumns()
  {
    return boardColumns;
  }
  public ListIterator<LevelDetail> getLandsIterator()
  {
    return lands.listIterator();
  }
}




Java Source Code List

org.aschyiel.rpg.Coords.java
org.aschyiel.rpg.Focus.java
org.aschyiel.rpg.GameObjectFactory.java
org.aschyiel.rpg.GameObject.java
org.aschyiel.rpg.ICanHasFocus.java
org.aschyiel.rpg.IFullGameObject.java
org.aschyiel.rpg.IGameObject.java
org.aschyiel.rpg.PowerChords.java
org.aschyiel.rpg.Resorcerer.java
org.aschyiel.rpg.activities.Launcher.java
org.aschyiel.rpg.activities.Sandbox.java
org.aschyiel.rpg.activities.Terrain.java
org.aschyiel.rpg.activities.sandbox.BasicCombat.java
org.aschyiel.rpg.activities.sandbox.BasicMovement.java
org.aschyiel.rpg.activities.sandbox.MovementVsLandTypes.java
org.aschyiel.rpg.graph.ChessBoard.java
org.aschyiel.rpg.graph.DefaultPathFinder.java
org.aschyiel.rpg.graph.GirlFriend.java
org.aschyiel.rpg.graph.NavPath.java
org.aschyiel.rpg.graph.Navigator.java
org.aschyiel.rpg.graph.OnSquareClickHandler.java
org.aschyiel.rpg.graph.PathFinder.java
org.aschyiel.rpg.graph.Step.java
org.aschyiel.rpg.graph.VacancySubscriber.java
org.aschyiel.rpg.level.LandType.java
org.aschyiel.rpg.level.LevelDetail.java
org.aschyiel.rpg.level.Level.java
org.aschyiel.rpg.level.Player.java
org.aschyiel.rpg.level.UnitType.java