Added the last of the game logic to the fourth section.