Package games.stendhal.server.entity.item.token

Examples of games.stendhal.server.entity.item.token.Token


   *            x-position
   * @param y
   *            y-position
   */
  private void addTokenToWorld(final int x, final int y) {
    final Token token = (Token) SingletonRepository.getEntityManager().getItem("arrow game token");
    token.setPosition(x, y);
    token.setTokenMoveListener(this);
    zone.add(token, false);
    tokens.add(token);
  }
View Full Code Here


      final int topX = tokens.get(0).getX();
      final int topY = tokens.get(0).getY();

      // check first row
      for (int i = 1; i <= 3; i++) {
        final Token token = tokens.get(i);
        if ((token.getX() != topX - 1 + (i - 1))
            || (token.getY() != topY + 1)) {
          return false;
        }
      }

      // check second row
      for (int i = 4; i <= 8; i++) {
        final Token token = tokens.get(i);
        if ((token.getX() != topX - 2 + (i - 4))
            || (token.getY() != topY + 2)) {
          return false;
        }
      }

      return true;
View Full Code Here

TOP

Related Classes of games.stendhal.server.entity.item.token.Token

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.