public boolean equals(DisplayState other) {
        if(other == null) return false;
        return other.getCurrState() == this.getCurrState() &&
                this.getImageIndex() == other.getImageIndex() &&
                this.commands.equals(other.getCommands());
    }