示例#1
0
 public boolean moveDown() {
   for (Cell cell : tetromino.getCells(this)) {
     if (isOccupied(cell.getCol(), cell.getRow() + 1)) return false;
   }
   tetromino.fall();
   return true;
 }
示例#2
0
 /** Déplace le tetromino vers la droite */
 public boolean moveRight() {
   for (Cell cell : tetromino.getCells(this))
     if (isOccupied(cell.getCol() + 1, cell.getRow())) return false;
   tetromino.moveRight();
   return true;
 }