Example #1
0
 public void dealWithRight() {
   if (!isCoordinateLock) {
     if (!isRightToEnd(cTetrisBlock.m_blockRightX))
       cTetrisBlock.setCoordinateXY(
           cTetrisBlock.getTetrisCoordinateX() + 20, cTetrisBlock.getTetrisCoordinateY());
     cGameDc.repaint();
   }
 }
Example #2
0
 public void dealWithDown() {
   if (!isCoordinateLock) {
     if (!isToEnd(cTetrisBlock.m_blockBottomY))
       cTetrisBlock.setCoordinateXY(
           cTetrisBlock.getTetrisCoordinateX(), cTetrisBlock.getTetrisCoordinateY() + 20);
     cGameDc.repaint();
   }
 }
Example #3
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();
   }
 }