public void update(){
        for(Map.Entry<Memorable,JLabel> entry:labels.entrySet()){
            Memorable memorable = entry.getKey();
            float hp = memorable.hasHistory();
            Color color=new Color(hp,hp,hp);
            if(hp==1){
                boolean wasBetter=false;
                float er=memorable.errorRate();
                if(best.containsKey(memorable)){
                    wasBetter=er> best.get(memorable);
                    er=Math.min(er, best.get(memorable));
                }
                best.put(memorable,er);
                if(wasBetter){
                    if(er<0.3){
                        color = new Color(0,128,0);
                    }else if(er>0.7){
                        color = new Color(128,0, 0);
                    }else{
                        color = new Color(128,128,0);
                    }
                }else{
                    if(er<0.3){
                        color = Color.GREEN;
                    }else if(er>0.7){
                        color = Color.RED;
                    }else{
                        color=Color.YELLOW;
                    }
                }
            }
            entry.getValue().setForeground(color);
        }
        root.repaint();
    }