Random movement update (1222)

Implemented random movement (at a basic level); Fixed teleportation
during side switching; Fixed floating formulae;