game almost done without OOP Javascript and needs a bug fix for the delay