@Override
    public boolean newPositionValide(Position nextPosition, int rotation) {
        TetrisShape shape = (TetrisShape) getCurrentPiece().getShape(rotation);

        for (int i = 0; i < TetrisShape.NB_ROW; i++) {
            for (int j = 0; j < TetrisShape.NB_COL; j++) {
                if (shape.getShape(i, j) != 0
                        && (nextPosition.getX() + i >= NB_ROW
                        || nextPosition.getY() + j >= NB_COL
                        || nextPosition.getX() + i < 0
                        || nextPosition.getY() + j < 0
                        || this.get(nextPosition.getX() + i, nextPosition.getY() + j).getColor() != Color.white)) {
                    return false;
                }
            }
        }
        return true;
    }