This page contains spoilers!
There are three endings in the game. Which ending you get depends on how many rooms you've skipped.
If you explore all (or nearly all) of the rooms, you are presented with the good ending.
If you skip some of the rooms or if you cheat, you are presented with the exile ending.
If you skip many of the rooms, you are presented with the bad ending.