Unlocking doors is a lot like the game mastermind. You have to guess the right order of the 5 pins. A wrong guess will put a red gem in that rows placement order, or a blue gem if you guessed correctly. Guess all 5 and you unlock the door and earn a bonus... or else you get attacked and the lock breaks (allowing you to pass either way). Hope that made sense.
There is a demo/tutorial on that site if you want to check it out. And thanks for the well wishes.