@Override
    public void command(Command command) {
        switch (command) {
            case OPEN:
                if (open) {
                    open = false;
                    passable = false;
                    opaque = true;
                    spriteID = closedsprite;
                } else {
                    open = true;
                    passable = true;
                    opaque = false;
                    spriteID = opensprite;
                }

        }
    }