Port of a little arcade game to javascript