Bomb.java :  » Game » completetetris » org » fableStudios » tetris » Java Open Source

Java Open Source » Game » completetetris 
completetetris » org » fableStudios » tetris » Bomb.java
package org.fableStudios.tetris;

public class Bomb extends BaseTetrisPiece {
  private static final long serialVersionUID=-5999209524976782113L;
  
  public Bomb() {
    super(6);
  }
  
  public enum State {
    Normal,
    BlowUp,
    Finished
  }
  @Override
  public BaseTetrisPiece rotateLeft() {
    return this;
  }
  @Override
  public BaseTetrisPiece rotateRight() {
    return this;
  }
  @Override
  public void setRandomShape() {
    pieceShape=TetrisShape.Bomb;
    coords=new int[][]
    {
      {-1, -1},
      {0, -1},
      {-1, 0},
      {0, 0},
      {0, 1},
      {0, 2}
    };
  }
  @Override
  public void setShape(TetrisShape shape) {
    pieceShape=TetrisShape.Bomb;
    coords=new int[][]
     {
       {-1, -1},
       {0, -1},
       {-1, 0},
       {0, 0},
       {0, 1},
       {0, 2}
     };
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.