public boolean rotate(Polyomino poly){
        //Allows for wall kicks
        for (int i=0; i<=poly.getLength()/2; i=(i<=0)?(-i+1):(-i)){
            boolean canRotate=true;
            for (Point loc:poly.getRotateAndTranslateLocs(i,0)){
                if (loc.y<0 || loc.x<0 || loc.x>=fWidth ||
                        contents[loc.y][loc.x] != null){
                    canRotate=false;
                }
            }
            if (canRotate){
                poly.translate(i, 0);
                poly.rotate();
                return true;
            }
        }
        return false;
    }