Example #1
0
 public void dealWithTrans() {
   if (!isCoordinateLock) {
     isTransforStart = true;
     cTetrisBlock.tetrisBlockShapeTransformation(m_blockGrid);
     cGameDc.repaint();
     isTransforStart = false;
   }
 }
Example #2
0
 public void dealWithRight() {
   if (!isCoordinateLock) {
     if (!isRightToEnd(cTetrisBlock.m_blockRightX))
       cTetrisBlock.setCoordinateXY(
           cTetrisBlock.getTetrisCoordinateX() + 20, cTetrisBlock.getTetrisCoordinateY());
     cGameDc.repaint();
   }
 }
Example #3
0
 public void dealWithDown() {
   if (!isCoordinateLock) {
     if (!isToEnd(cTetrisBlock.m_blockBottomY))
       cTetrisBlock.setCoordinateXY(
           cTetrisBlock.getTetrisCoordinateX(), cTetrisBlock.getTetrisCoordinateY() + 20);
     cGameDc.repaint();
   }
 }
Example #4
0
 /** the method for c++ dll */
 public void dealWithLeft() {
   System.out.println("nihaoma");
   if (!isCoordinateLock) {
     if (!isLeftToEnd(cTetrisBlock.m_blockLeftX))
       cTetrisBlock.setCoordinateXY(
           cTetrisBlock.getTetrisCoordinateX() - 20, cTetrisBlock.getTetrisCoordinateY());
     cGameDc.repaint();
   }
 }