JavaScript implementation of Space Invaders game