Breakout Game – Track the score and win

Objective
In this lesson, students will learn:

  • How to award points for every brick a user hits, and keep count of the total score
  • How to give the paddle mouse control
  • How to give players lives



Logical operators are typically used with Boolean (logical) values. When they are, they return a Boolean value. However, the && and || operators actually return the value of one of the specified operands, so if these operators are used with non-Boolean values, they may return a non-Boolean value.


References
Track the Score and Win
Mouse Controls
Finishing Up
Logical Operators

Advertisements