Fixed horizontal movement

Fixed the horizontal ball movement by comparing the variable 'x' with a
integer near to the width of the screen, which is a float value.