Javascript game works