sorted out a basic wrapping functionality quite quickly. this also works for other objects such as asteroids and bullets, rather than just for ship.