factored out vector logic and position getting and setting
pieces moving and rotating