Javascript version of 2D fighter