public Action(Peg x, Peg y, Peg z, Action parent, int type, int diskNum)
    {
        this.x = x;
        this.y = y;
        this.z = z;
        this.diskNum = diskNum;

        while ((width = 3 * Peg.width + horMargin*4) <= 250) {
            horMargin += 10;
        }
        height = Peg.height + vertMargin*2;

        this.parent = parent;
        if (this.parent != null) {
            centerY = parent.centerY + height;
            switch (type) {
                case 1:
                    centerX = parent.centerX - width;
                    break;
                case 2:
                    centerX = parent.centerX;
                    break;
                case 3:
                    centerX = parent.centerX + width;
                    break;
            }
        }

        //System.out.println(String.format("Creating action x:%d, y:%d", centerX, centerY));
    }