private void initialize(int type) throws IllegalArgumentException {
        
        // Initialize default variables
        board = null;
        xPos = 0;
        yPos = 0;
        orientation = 0;

        // Initialize figure type variables
        switch (type) {
        case SQUARE_FIGURE :
            maxOrientation = 1;
            color = Configuration.getColor("figure.square", "#ffd8b1");
            shapeX[0] = -1;
            shapeY[0] = 0;
            shapeX[1] = 0;
            shapeY[1] = 0;
            shapeX[2] = -1;
            shapeY[2] = 1;
            shapeX[3] = 0;
            shapeY[3] = 1;
            break;
        case LINE_FIGURE :
            maxOrientation = 2;
            color = Configuration.getColor("figure.line", "#ffb4b4");
            shapeX[0] = -2;
            shapeY[0] = 0;
            shapeX[1] = -1;
            shapeY[1] = 0;
            shapeX[2] = 0;
            shapeY[2] = 0;
            shapeX[3] = 1;
            shapeY[3] = 0;
            break;
        case S_FIGURE :
            maxOrientation = 2;
            color = Configuration.getColor("figure.s", "#a3d5ee");
            shapeX[0] = 0;
            shapeY[0] = 0;
            shapeX[1] = 1;
            shapeY[1] = 0;
            shapeX[2] = -1;
            shapeY[2] = 1;
            shapeX[3] = 0;
            shapeY[3] = 1;
            break;
        case Z_FIGURE :
            maxOrientation = 2;
            color = Configuration.getColor("figure.z", "#f4adff");
            shapeX[0] = -1;
            shapeY[0] = 0;
            shapeX[1] = 0;
            shapeY[1] = 0;
            shapeX[2] = 0;
            shapeY[2] = 1;
            shapeX[3] = 1;
            shapeY[3] = 1;
            break;
        case RIGHT_ANGLE_FIGURE :
            maxOrientation = 4;
            color = Configuration.getColor("figure.right", "#c0b6fa");
            shapeX[0] = -1;
            shapeY[0] = 0;
            shapeX[1] = 0;
            shapeY[1] = 0;
            shapeX[2] = 1;
            shapeY[2] = 0;
            shapeX[3] = 1;
            shapeY[3] = 1;
            break;
        case LEFT_ANGLE_FIGURE :
            maxOrientation = 4;
            color = Configuration.getColor("figure.left", "#f5f4a7");
            shapeX[0] = -1;
            shapeY[0] = 0;
            shapeX[1] = 0;
            shapeY[1] = 0;
            shapeX[2] = 1;
            shapeY[2] = 0;
            shapeX[3] = -1;
            shapeY[3] = 1;
            break;
        case TRIANGLE_FIGURE :
            maxOrientation = 4;
            color = Configuration.getColor("figure.triangle", "#a4d9b6");
            shapeX[0] = -1;
            shapeY[0] = 0;
            shapeX[1] = 0;
            shapeY[1] = 0;
            shapeX[2] = 1;
            shapeY[2] = 0;
            shapeX[3] = 0;
            shapeY[3] = 1;
            break;
        default :
            throw new IllegalArgumentException("No figure constant: " + 
                                               type);
        }
    }