public void setType(int type) {
        this.type = type;
        //set color
        switch (Math.abs(type)) {
            case 1:
                inner1 = new Color(215, 15, 55);
                inner2 = new Color(254, 78, 113);
                backgroundColor = new Color(247, 32, 57);
                left = new Color(255, 181, 181);
                right = new Color(199, 14, 51);
                borderColor = new Color(158, 12, 41);
                break;
            case 2:
                inner1 = new Color(15, 155, 215);
                inner2 = new Color(33, 190, 255);
                backgroundColor = new Color(9, 174, 247);
                left = new Color(95, 206, 254);
                right = new Color(9, 140, 196);
                borderColor = new Color(2, 88, 108);
                break;
            case 3:
                inner1 = new Color(33, 65, 198);
                inner2 = new Color(47, 114, 220);
                backgroundColor = new Color(33, 89, 222);
                left = new Color(71, 134, 226);
                right = new Color(27, 70, 169);
                borderColor = new Color(1, 36, 118);
                break;
            case 4:
                inner1 = new Color(255, 194, 37);
                inner2 = new Color(255, 234, 76);
                backgroundColor = new Color(255, 217, 59);
                left = new Color(255, 249, 155);
                right = new Color(255, 177, 37);
                borderColor = new Color(153, 102, 0);
                break;
            case 5:
                inner1 = new Color(89, 177, 1);
                inner2 = new Color(128, 211, 22);
                backgroundColor = new Color(99, 199, 16);
                left = new Color(182, 236, 108);
                right = new Color(84, 162, 13);
                borderColor = new Color(2, 92, 1);
                break;
            case 6:
                inner1 = new Color(210, 76, 173);
                inner2 = new Color(246, 93, 220);
                backgroundColor = new Color(232, 76, 201);
                left = new Color(254, 131, 242);
                right = new Color(189, 68, 166);
                borderColor = new Color(102, 0, 102);
                break;
            case 7:
                inner1 = new Color(253, 102, 2);
                inner2 = new Color(252, 148, 46);
                backgroundColor = new Color(255, 121, 0);
                left = new Color(254, 168, 85);
                right = new Color(219, 88, 2);
                borderColor = new Color(153, 51, 0);
                break;
            default:
                backgroundColor = new Color(1, 1, 1);
                borderColor = new Color(25, 25, 25);
        }
        if (type < 0) {
            inner1 = inner1.darker().darker().darker();
            inner2 = inner2.darker().darker().darker();
            backgroundColor = backgroundColor.darker().darker().darker();
            squareColor = new Color(120, 120, 120);
            left = left.darker().darker().darker();
            right = right.darker().darker().darker();
            borderColor = borderColor.darker().darker().darker();
        } else {
            squareColor = Color.WHITE;
        }
        setBorder(new LineBorder(borderColor));
    }