package clpkg;

public class CombinationLock {
  private boolean myState;  // myState is true if the lock is open, false otherwise
  private String myCombination;  // A 3 char string representing the combination
  private String myTry;  // A string that represents the tries to open the lock.

  public CombinationLock( String aCombination ) {
    myCombination = aCombination;
    startOver();
  }

  public void startOver(){
    myState = false;
    myTry = "";
  }

  public void setPosition(String aPosition) {
    // must check myTry to see if it has 3 chars.
    // if so, drop leftmost char
    myTry = myTry + aPosition;
  }

  public void unlock() {
    // compare myTry and myCombination for equality
  }
}

