Added pseudo code and logic to level class.