Examples of pcolor()


Examples of org.nlogo.agent.Patch.pcolor()

      Patch patch = world.getPatch(i);
      int liveNeighbors =
          ((Double) patch.variables[LIVE_NEIGHBORS_VAR]).intValue();
      if (liveNeighbors == 3) {
        patch.variables[LIVING_VAR] = Boolean.TRUE;
        patch.pcolor(fgcolor);
      } else if (liveNeighbors != 2) {
        patch.variables[LIVING_VAR] = Boolean.FALSE;
        patch.pcolor(bgcolor);
      }
    }
View Full Code Here

Examples of org.nlogo.agent.Patch.pcolor()

      if (liveNeighbors == 3) {
        patch.variables[LIVING_VAR] = Boolean.TRUE;
        patch.pcolor(fgcolor);
      } else if (liveNeighbors != 2) {
        patch.variables[LIVING_VAR] = Boolean.FALSE;
        patch.pcolor(bgcolor);
      }
    }
    world.tickCounter.tick(1);
    context.ip = next;
  }
View Full Code Here

Examples of org.nlogo.agent.Patch.pcolor()

                      .doubleValue() + 1);
        }
      } else {
        if (pcolor > RED_MINUS_FOUR && pcolor < RED_PLUS_ONE) {
          // set pcolor pcolor - 0.3
          patch.pcolor(pcolor - 0.3);
        }
      }
    }
    context.ip = next;
  }
View Full Code Here

Examples of org.nlogo.api.Patch.pcolor()

    }
    if (outlineAgent instanceof Patch) {
      Patch patch = (Patch) outlineAgent;
      topology.drawWrappedRect(g,
          org.nlogo.api.Color.getComplement
              (org.nlogo.api.Color.getColor(patch.pcolor())),
          1.0f, patch.pxcor(), patch.pycor(), 1, patchSize, false);
    }
  }

  @Override
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.