Examples of down()


Examples of aima.core.util.datastructure.XYLocation.down()

  @Test
  public void testSimpleVerticalAttack() {
    XYLocation loc = new XYLocation(0, 0);
    board.addQueenAt(loc);
    Assert.assertEquals(0, board.getNumberOfAttacksOn(loc));
    Assert.assertEquals(1, board.getNumberOfAttacksOn(loc.down()));
    Assert.assertEquals(1, board.getNumberOfAttacksOn(new XYLocation(0, 7)));
  }

  @Test
  public void testSimpleDiagonalAttack() {
View Full Code Here

Examples of aima.core.util.datastructure.XYLocation.down()

  @Test
  public void testSimpleDiagonalAttack() {
    XYLocation loc = new XYLocation(3, 3);
    board.addQueenAt(loc);
    Assert.assertEquals(0, board.getNumberOfAttacksOn(loc));
    Assert.assertEquals(1, board.getNumberOfAttacksOn(loc.down().right()));
    Assert.assertEquals(1, board.getNumberOfAttacksOn(loc.down().left()));
    Assert.assertEquals(1, board.getNumberOfAttacksOn(loc.up().left()));
    Assert.assertEquals(1, board.getNumberOfAttacksOn(loc.up().right()));
    Assert.assertEquals(1, board.getNumberOfAttacksOn(new XYLocation(7, 7)));
    Assert.assertEquals(1, board.getNumberOfAttacksOn(new XYLocation(0, 0)));
View Full Code Here

Examples of aima.core.util.datastructure.XYLocation.down()

  public void testSimpleDiagonalAttack() {
    XYLocation loc = new XYLocation(3, 3);
    board.addQueenAt(loc);
    Assert.assertEquals(0, board.getNumberOfAttacksOn(loc));
    Assert.assertEquals(1, board.getNumberOfAttacksOn(loc.down().right()));
    Assert.assertEquals(1, board.getNumberOfAttacksOn(loc.down().left()));
    Assert.assertEquals(1, board.getNumberOfAttacksOn(loc.up().left()));
    Assert.assertEquals(1, board.getNumberOfAttacksOn(loc.up().right()));
    Assert.assertEquals(1, board.getNumberOfAttacksOn(new XYLocation(7, 7)));
    Assert.assertEquals(1, board.getNumberOfAttacksOn(new XYLocation(0, 0)));
    Assert.assertEquals(1, board.getNumberOfAttacksOn(new XYLocation(6, 0)));
View Full Code Here

Examples of com.intellij.util.concurrency.Semaphore.down()

    final String evalText = xExpression == null ? null : xExpression.getExpression();
    if (topFrame == null || StringUtil.isEmptyOrSpaces(evalText)) return null;

    final Ref<String> evalResult = new Ref<String>();
    final Semaphore semaphore = new Semaphore();
    semaphore.down();

    try {
      myDebugProcess.getVmConnection().evaluateOnCallFrame(isolate, topFrame, evalText, new VmCallback<VmValue>() {
        public void handleResult(final VmResult<VmValue> result) {
          final VmValue vmValue = result.getResult();
View Full Code Here

Examples of com.intellij.util.concurrency.Semaphore.down()

    ApplicationManager.getApplication().invokeAndWait(new Runnable() {
      public void run() {

        //Save all opened documents
        FileDocumentManager.getInstance().saveAllDocuments();
        targetDone.down();

        new Task.Backgroundable(project, "Init PhoneGap/Cordova platform", true) {

          public boolean shouldStartInBackground() {
            return true;
View Full Code Here

Examples of com.intellij.util.concurrency.Semaphore.down()

  }

  public static void invokeAndWait(boolean timed, final Runnable runnable) {
    if (timed) {
      final Semaphore semaphore = new Semaphore();
      semaphore.down();
      SwingUtilities.invokeLater(new Runnable() {
        @Override
        public void run() {
          runnable.run();
          semaphore.up();
View Full Code Here

Examples of com.voyagegames.core.modules.Counter.down()

  }

  @Test
  public void down_decrementsValue() {
    Counter c = new Counter();
    c.down();
    assertTrue(c.value() == -1);
  }

  @Test
  public void down_decrementsBySpecificValue() {
View Full Code Here

Examples of com.voyagegames.core.modules.Counter.down()

  }

  @Test
  public void down_decrementsBySpecificValue() {
    Counter c = new Counter();
    c.down(5);
    assertTrue(c.value() == -5);
  }

}
View Full Code Here

Examples of com.voyagegames.core.modules.CounterDown.down()

  }

  @Test
  public void down_decrementsValue() {
    CounterDown c = new CounterDown();
    c.down();
    assertTrue(c.value() == -1);
  }

  @Test
  public void down_decrementsBySpecificValue() {
View Full Code Here

Examples of com.voyagegames.core.modules.CounterDown.down()

  }

  @Test
  public void down_decrementsBySpecificValue() {
    CounterDown c = new CounterDown();
    c.down(5);
    assertTrue(c.value() == -5);
  }

}
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.