Javascript game

Actually solved I missed out something in between. Thank you