Skip to content

Commit

Permalink
Inserted some documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
angela-zhou committed Jan 27, 2019
1 parent 9bbd7e7 commit 20ce448
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ICS4UC_RST/src/spaceInvaders/SpaceGame.java
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,10 @@ public void handle(long now) {
}
}

/**
* Determine if the game is over
*/
// if player loses
if (player.isDead) {
gameOver = true;
losses ++;
Expand All @@ -336,6 +340,7 @@ public void handle(long now) {

}

// if player wins
if (deadInvaders == (NUM_INVADERS * NUM_INVADERS)) {
gameOver = true;
wins++;
Expand Down

0 comments on commit 20ce448

Please sign in to comment.