Examples of Block


Examples of Block

    }

    private ArrayList<Block> getBlocksAroundBlockByState(int column, int row, BlockState blockState){
        ArrayList<Block> blocksWithBlockState = new ArrayList<Block>();
        for(Direction direction : Direction.values()){
            Block block = getBlockFromDirection(column, row, direction);
            if(block!=null && block.getBlockState()!=null && block.getBlockState()== blockState)
                blocksWithBlockState.add(block);
        }
        return blocksWithBlockState;
    }
View Full Code Here

Examples of Block.Block

    private void generateBlocks(int columns, int rows) {
        blocks = new Block[columns][rows];
        for(int c=0; c<columns; c++)
            for(int r=0; r<rows; r++)
                blocks[c][r] = new Block(c*blockSize, r*blockSize, blockSize, blockSize);
    }
View Full Code Here

Examples of Hexel.blocks.types.Block

        }
      }
      else {
        Vector3i closestBlock = blocksAttacking.get(blocksAttacking.size()-1);
        Vector3i tmp3i = new Vector3i();
        Block b = thingBridge.engine.chunks.getBlock(closestBlock.x, closestBlock.y, closestBlock.z, tmp3i, (Chunk)null);
        if (!(b instanceof BlockEmpty || b instanceof BlockWater)){
          if (closestBlock != null) {
            RemoveBlock ab = new RemoveBlock();
            ab.x = closestBlock.x;
            ab.y = closestBlock.y;
View Full Code Here

Examples of Tetris.Structures.Block

   
    gameGrid = new Grid(false);
    gameGrid.setBounds(150, 10, 305, 600);
    this.add(gameGrid);
   
    gameBlock = new Block(gameGrid);
   
    inQueueGrid = new Grid[QUEUE_SIZE];
    inQueueBlock = new Block[QUEUE_SIZE];
   
    JLabel
    nextLabel = new JLabel("Next");
    nextLabel.setForeground(Program.foreground);
    nextLabel.setHorizontalAlignment(SwingConstants.CENTER);
    nextLabel.setFont(Program.displayFont(Font.BOLD, 15));
    nextLabel.setBounds(480, 20, 100, 40);
    this.add(nextLabel);
   
    for (int i = 0; i < QUEUE_SIZE; ++i) {
      inQueueGrid[i] = new Grid(true);
      inQueueGrid[i].setBounds(480, 70 + 110 * i, 100, 100);
      this.add(inQueueGrid[i]);
     
      inQueueBlock[i] = new Block((inQueueGrid[i]));
    }
   
    MainFrame.setGamePanel(this);
    fallTimer.start();
  }
View Full Code Here

Examples of _api.alienfactory.javamappy.Block

   */
  public int calculateTallestPillar() {
    int tallest = 0;
    int pillarHeight, pillarTop = 0, tower = 0;
    int blockHeight = mapHeader.getBlockHeight();
    Block block;
    Block[] blocks = layer.getBlocks();
    for (int i = 0; i < blocks.length; i++) {
      block = blocks[i];

      pillarHeight = tower = 0;
      if (block.getImageIndex(Block.BACKGROUND) != 0)
        pillarHeight = blockHeight * 1;
      if (block.getImageIndex(Block.FOREGROUND1) != 0)
        pillarHeight = blockHeight * 1;
      if (block.getImageIndex(Block.FOREGROUND2) != 0)
        pillarHeight = blockHeight * 2;
      if (block.getImageIndex(Block.FOREGROUND3) != 0)
        pillarHeight = blockHeight * 3;
     
      while (blocks[i].getFlag(Block.ATTACH_NEXT)) {
        // we don't like index out of bounds exceptions
        if (i++ >= blocks.length) break;
        block = blocks[i];
        pillarTop = 0;
       
        if (block.getImageIndex(Block.BACKGROUND) != 0)
          pillarTop = 1;
        if (block.getImageIndex(Block.FOREGROUND1) != 0)
          pillarTop = 2;
        if (block.getImageIndex(Block.FOREGROUND2) != 0)
          pillarTop = 3;
        if (block.getImageIndex(Block.FOREGROUND3) != 0)
          pillarTop = 4;

        tower += 4;
        if (pillarTop > 0)
          pillarHeight = (tower + pillarTop - 1) * blockHeight;       
 
View Full Code Here

Examples of avrora.core.ControlFlowGraph.Block

            //scan each basic block and fine the corresponding label, e.g. procedure
            Iterator it = program.getCFG().getSortedBlockIterator();
            int address;
            int size;
            while (it.hasNext()) {
                Block block = (Block)it.next();
                size = block.getSize();
                address = block.getAddress();
                if (size > 0 && program.readInstr(address) != null) {
                    labelLookup.put(new Integer(address), nearestLabel(address));
                    s.insertProbe(procedureProbe, address);
                }
            }
View Full Code Here

Examples of bm.vm.lang.Block

        }
        else
        {
            argClasses = null;
        }
        body = new Block();
        body.setMethod( this );
        body.deserialize( in );
    }
View Full Code Here

Examples of br.usp.each.saeg.opal.Block

                list.add(new Dua(i.id, new PUse(i.id, succ.id), var));
            }
        }
        while (top > 0) {

            final Block j = queue[--top];

            // is not necessary remove queued mark (since a node is visited only
            // once). We use the queued mark to indicate that a node has already
            // been visited or will be visited soon.

            if (j.isCUse(var)) {
                list.add(new Dua(i.id, new CUse(j.id), var));
            }
            if (j.isPUse(var) && !j.isDef(var)) {
                for (final Block succ : graph.neighbors(j.id)) {
                    list.add(new Dua(i.id, new PUse(j.id, succ.id), var));
                }
            }
            if (j.isDef(var)) {
                // backtrack
                continue;
            }

            for (final Block succ : graph.neighbors(j.id)) {
View Full Code Here

Examples of ca.uhn.fhir.model.api.annotation.Block

      } else {
        throw new ConfigurationException("Type contains a @" + CodeTableDef.class.getSimpleName() + " annotation but does not implement " + ICodeEnum.class.getCanonicalName() + ": " + theClass.getCanonicalName());
      }
    }

    Block blockDefinition = theClass.getAnnotation(Block.class);
    if (blockDefinition != null) {
      if (IResourceBlock.class.isAssignableFrom(theClass)) {
        @SuppressWarnings("unchecked")
        Class<? extends IResourceBlock> blockClass = (Class<? extends IResourceBlock>) theClass;
        scanBlock(blockClass, blockDefinition);
View Full Code Here

Examples of client.net.sf.saxon.ce.expr.instruct.Block

        // Avoid doing this when streaming because xsl:value-of select="@*,node()" is not currently streamable
        if (operator == Token.UNION && operand0 instanceof AxisExpression && operand1 instanceof AxisExpression) {
            AxisExpression a0 = (AxisExpression)operand0;
            AxisExpression a1 = (AxisExpression)operand1;
            if (a0.getAxis() == Axis.ATTRIBUTE && a1.getAxis() == Axis.CHILD) {
                Block b = new Block();
                b.setChildren(new Expression[]{operand0, operand1});
                return b;
            } else if (a1.getAxis() == Axis.ATTRIBUTE && a0.getAxis() == Axis.CHILD) {
                Block b = new Block();
                b.setChildren(new Expression[]{operand1, operand0});
                return b;
            }
        }

        return this;
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.