Types in GraceTopAnnouncementsMore conditionals

More conditionals

Boolean data type has operations &&, ||, and not. Relations ==, !=, <, <=, >, and >= all return values of type Boolean

  1. Our first attempt at writing Pong. Unfortunately, the paddle doesn't stay in the boundaries. (Don't worry about the ball, we'll come back to that later.)

    Click on PongUnbounded to show the example. (We do not yet make the code for the ball available.)

  2. Our second attempt at writing Pong. This time the paddle stays in the boundaries.

    Click on PongPaddleBounded to show the example.


Types in GraceTopAnnouncementsMore conditionals