コード例 #1
0
  public void calculate(Blocks caller, Grid g) {
    Blocks.wait(1); // accounts for the torch delay -- may not be necessary, depending on realism of
    // problems

    setState(
        !getSurroundings(g)[getOrient()]
            .getState()); // if placed on the side of a block, its orientation is the direction of
    // the block it's sitting on.

    setCharge(); // laziness?

    // if (oldState != getState() || oldCharge != getCharge())
    // g.addUpdate(getPos());

    calculateAll(g);
    // getGrid().addCalced(this.getPos());
  }