Controlling movment of ship

Say I want to do the following.
Move ship right until it gets to 98 then do not allow ship to move any further right.
move ship left until it gets to -98 then do not allow ship to move any further left.
Also:
If ship is destroyed by enemy shot then create new ship and subtract 1 from ship total. Update total on screen.
Move ship right until it gets to 98 then do not allow ship to move any further right.
move ship left until it gets to -98 then do not allow ship to move any further left.
Also:
If ship is destroyed by enemy shot then create new ship and subtract 1 from ship total. Update total on screen.