Added game end condition (defined by the level). Fixed minor bug in the random level generator.