Lesson 3 - Added the game logic