Applying The Principles of Games To Learning