simplified tank movement functions, removing repeated code.