Updated final code
Changes
Updated code for game