Coverage Summary for Class: Achievements (io.github.unisim)

Class Class, % Method, % Branch, % Line, %
Achievements 100% (1/1) 80% (4/5) 50% (1/2) 90.9% (10/11)


 package io.github.unisim;
 
 public class Achievements {
     private String name;
     private String description;
     private boolean unlocked;
 
     /**
      * create a class to store the name and description of each achievement
      *
      * @param name - the name of the achievement
      * @param description - the criteria to unlock the achievement
      */
     public Achievements(String name, String description) {
         this.name = name;
         this.description = description;
         this.unlocked = false;
     }
 
     public String getName() {
         return name;
     }
 
     public String getDescription() {
         return description;
     }
 
     public boolean isUnlocked() {
         return unlocked;
     }
 
     public void unlock() {
         if (!unlocked) {
             unlocked = true;
         }
     }
 
 }