At the failing line, lockdoors
resolves to a String and not a HashSet expression.
This is because the local variable shadows the member variable with the same name.
String lockedDoors = ""; // shadowed here
Set<String> doorSet = lockedDoors.keySet(); // and String.keySet() is bogus
Solution: You can either use a different name for your local variable (recommended, IMO) or use the this
keyword to reference the instance level variable (a concept often required). Here's a sample.
String lockedDoors = "";
Set<String> doorSet = this.lockedDoors.keySet();