public void setState(State s) {
        switch (s) {
            case COVERED:
                setIcon(Icon.COVERED.image);
                break;
            case FLAGGED:
                setIcon(Icon.FLAG.image);
                break;
            case QUESTIONED:
                setIcon(Icon.QUESTION.image);
                break;
            case REVEALED:
                if (isMine()) {
                    setIcon(Icon.MINE.image);
                } else {
                    int number = ((Empty) this).getNumber();
                    setIcon(Icon.values()[number].image);
                }
                break;
            case LOST:
                setIcon(Icon.LOST.image);
                break;
        }
        state = s;
    }