Examples of step()


Examples of games.stendhal.server.entity.npc.fsm.Engine.step()

  @Test
  public void testHiAndBye() {
    final SpeakerNPC npc = getNPC("Felina");
    final Engine en = npc.getEngine();

    assertTrue(en.step(player, "hi Felina"));
    assertEquals("Greetings! How may I help you?", getReply(npc));

    assertTrue(en.step(player, "bye"));
    assertEquals("Bye.", getReply(npc));
  }
View Full Code Here

Examples of games.stendhal.server.entity.npc.fsm.Engine.step()

    final Engine en = npc.getEngine();

    assertTrue(en.step(player, "hi Felina"));
    assertEquals("Greetings! How may I help you?", getReply(npc));

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

  /**
   * Tests for buyCat.
View Full Code Here

Examples of games.stendhal.server.entity.npc.fsm.Engine.step()

  @Test
  public void testBuyCat() {
    final SpeakerNPC npc = getNPC("Felina");
    final Engine en = npc.getEngine();

    assertTrue(en.step(player, "hi"));
    assertEquals("Greetings! How may I help you?", getReply(npc));

    assertTrue(en.step(player, "job"));
    assertEquals("I sell cats. Well, really they are just little kittens when I sell them to you but if you #care for them well they grow into cats.", getReply(npc));
View Full Code Here

Examples of games.stendhal.server.entity.npc.fsm.Engine.step()

    final Engine en = npc.getEngine();

    assertTrue(en.step(player, "hi"));
    assertEquals("Greetings! How may I help you?", getReply(npc));

    assertTrue(en.step(player, "job"));
    assertEquals("I sell cats. Well, really they are just little kittens when I sell them to you but if you #care for them well they grow into cats.", getReply(npc));

    assertTrue(en.step(player, "care"));
    assertEquals("Cats love chicken and fish. Just place a piece on the ground and your cat will run over to eat it. You can right-click on her and choose 'Look' at any time, to check up on her weight; she will gain one unit of weight for every piece of chicken she eats.", getReply(npc));
View Full Code Here

Examples of games.stendhal.server.entity.npc.fsm.Engine.step()

    assertEquals("Greetings! How may I help you?", getReply(npc));

    assertTrue(en.step(player, "job"));
    assertEquals("I sell cats. Well, really they are just little kittens when I sell them to you but if you #care for them well they grow into cats.", getReply(npc));

    assertTrue(en.step(player, "care"));
    assertEquals("Cats love chicken and fish. Just place a piece on the ground and your cat will run over to eat it. You can right-click on her and choose 'Look' at any time, to check up on her weight; she will gain one unit of weight for every piece of chicken she eats.", getReply(npc));

    // There is currently no quest response defined for Felina.
    assertFalse(en.step(player, "quest"));
View Full Code Here

Examples of games.stendhal.server.entity.npc.fsm.Engine.step()

    assertTrue(en.step(player, "care"));
    assertEquals("Cats love chicken and fish. Just place a piece on the ground and your cat will run over to eat it. You can right-click on her and choose 'Look' at any time, to check up on her weight; she will gain one unit of weight for every piece of chicken she eats.", getReply(npc));

    // There is currently no quest response defined for Felina.
    assertFalse(en.step(player, "quest"));

    assertTrue(en.step(player, "buy"));
    assertEquals("A cat will cost 100. Do you want to buy it?", getReply(npc));
    assertTrue(en.step(player, "no"));
    assertEquals("Ok, how else may I help you?", getReply(npc));
View Full Code Here

Examples of games.stendhal.server.entity.npc.fsm.Engine.step()

    assertEquals("Cats love chicken and fish. Just place a piece on the ground and your cat will run over to eat it. You can right-click on her and choose 'Look' at any time, to check up on her weight; she will gain one unit of weight for every piece of chicken she eats.", getReply(npc));

    // There is currently no quest response defined for Felina.
    assertFalse(en.step(player, "quest"));

    assertTrue(en.step(player, "buy"));
    assertEquals("A cat will cost 100. Do you want to buy it?", getReply(npc));
    assertTrue(en.step(player, "no"));
    assertEquals("Ok, how else may I help you?", getReply(npc));

    assertTrue(en.step(player, "buy dog"));
View Full Code Here

Examples of games.stendhal.server.entity.npc.fsm.Engine.step()

    // There is currently no quest response defined for Felina.
    assertFalse(en.step(player, "quest"));

    assertTrue(en.step(player, "buy"));
    assertEquals("A cat will cost 100. Do you want to buy it?", getReply(npc));
    assertTrue(en.step(player, "no"));
    assertEquals("Ok, how else may I help you?", getReply(npc));

    assertTrue(en.step(player, "buy dog"));
    assertEquals("Sorry, I don't sell dogs.", getReply(npc));
View Full Code Here

Examples of games.stendhal.server.entity.npc.fsm.Engine.step()

    assertTrue(en.step(player, "buy"));
    assertEquals("A cat will cost 100. Do you want to buy it?", getReply(npc));
    assertTrue(en.step(player, "no"));
    assertEquals("Ok, how else may I help you?", getReply(npc));

    assertTrue(en.step(player, "buy dog"));
    assertEquals("Sorry, I don't sell dogs.", getReply(npc));

    assertTrue(en.step(player, "buy house"));
    assertEquals("Sorry, I don't sell houses.", getReply(npc));
View Full Code Here

Examples of games.stendhal.server.entity.npc.fsm.Engine.step()

    assertEquals("Ok, how else may I help you?", getReply(npc));

    assertTrue(en.step(player, "buy dog"));
    assertEquals("Sorry, I don't sell dogs.", getReply(npc));

    assertTrue(en.step(player, "buy house"));
    assertEquals("Sorry, I don't sell houses.", getReply(npc));

    assertTrue(en.step(player, "buy someunknownthing"));
    assertEquals("Sorry, I don't sell someunknownthings.", getReply(npc));
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.