Completed game functionality for project 5