Simple java 2d physics engine