Examples of Area


Examples of games.stendhal.server.util.Area

    dealer.configureZone(zone, null);

    quest.addToWorld();

    Area table = dealer.getPlayingArea();
    Rectangle tableBounds = table.getShape().getBounds();
    player.setPosition(tableBounds.x+1, tableBounds.y-1);
  }
View Full Code Here

Examples of games.stendhal.server.util.Area

    en.step(player, "bye");
    assertEquals("Bye.", getReply(npc));
  }

  private boolean rollDice() {
    Area table = dealer.getPlayingArea();
    Rectangle tableBounds = table.getShape().getBounds();

    Item dice = player.getFirstEquipped("dice");
    if (dice == null) {
      return false;
    }
View Full Code Here

Examples of games.stendhal.server.util.Area

   *
   * @param playingArea
   *            shape of the playing area (in the same zone as the NPC)
   */
  public void setTableArea(final Rectangle playingArea) {
    this.playingArea = new Area(getZone(), playingArea);
  }
View Full Code Here

Examples of games.stendhal.server.util.Area

  private List<ChatCondition> conditionsB2;

  @SuppressWarnings("serial")
  @Before
  public void setUp() throws Exception {
    final Area ar = new Area(new StendhalRPZone("test"), new Rectangle() {
      // just an empty sub class
    });
    final ChatCondition[] conarray = new ChatCondition[] { new AdminCondition(),
        new AlwaysTrueCondition(),
        new AndCondition(new AlwaysTrueCondition()),
View Full Code Here

Examples of games.stendhal.server.util.Area

    MockStendlRPWorld.get().addRPZone(ados_wall_n);
    final DeathmatchRecruiterNPC configurator =  new DeathmatchRecruiterNPC();
    configurator.configureZone(zone, null);
    // some of the recruiter responses are defined in the quest not the configurator
   
    new AdosDeathmatch(ados_wall_n, new Area(ados_wall_n, new Rectangle2D.Double(0, 0, ados_wall_n.getWidth(), ados_wall_n.getHeight()))).addToWorld()
  }
View Full Code Here

Examples of games.stendhal.server.util.Area

   * Tests for hashCode.
   */
  @SuppressWarnings("serial")
  @Test
  public final void testHashCode() {
    final Area ar = new Area(new StendhalRPZone("test"), new Rectangle() {
      // this is an anonymous sub class
    });

    final PlayerInAreaCondition cond = new PlayerInAreaCondition(null);

View Full Code Here

Examples of games.stendhal.server.util.Area

   */
  @SuppressWarnings("serial")
  @Test
  public final void testFire() {
    final StendhalRPZone zone = new StendhalRPZone("test");
    final Area ar = new Area(zone, new Rectangle(-2, -2, 4, 4) {
      // this is an anonymous sub class
    });
    final PlayerInAreaCondition cond = new PlayerInAreaCondition(ar);
    final Player player = PlayerTestHelper.createPlayer("player");
    assertFalse(cond.fire(player, null, null));
    zone.add(player);
    assertTrue(ar.contains(player));
    assertTrue(cond.fire(player, null, null));

  }
View Full Code Here

Examples of games.stendhal.server.util.Area

   */
  @SuppressWarnings("serial")
  @Test
  public final void testPlayerInAreaCondition() {
    new PlayerInAreaCondition(null);
    new PlayerInAreaCondition(new Area(new StendhalRPZone("test"),
        new Rectangle() {
          // this is an anonymous sub class
      }));
  }
View Full Code Here

Examples of games.stendhal.server.util.Area

   * Tests for toString.
   */
  @SuppressWarnings("serial")
  @Test
  public final void testToString() {
    final Area ar = new Area(new StendhalRPZone("test"), new Rectangle() {
      // this is an anonymous sub class
    });
    assertEquals("player in <null>",
        new PlayerInAreaCondition(null).toString());
    assertEquals("player in <" + ar.toString() + ">",
        new PlayerInAreaCondition(ar).toString());
  }
View Full Code Here

Examples of games.stendhal.server.util.Area

   * Tests for equalsObject.
   */
  @SuppressWarnings("serial")
  @Test
  public final void testEqualsObject() {
    final Area ar = new Area(new StendhalRPZone("test"), new Rectangle() {
      // this is an anonymous sub class
    });
    final Area ar2 = new Area(new StendhalRPZone("test2"), new Rectangle() {
      // this is an anonymous sub class
    });
    final PlayerInAreaCondition cond = new PlayerInAreaCondition(null);

    assertTrue(cond.equals(cond));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.