added logic for ship to move