Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Malte Büchmann committed Jan 23, 2013
1 parent 8e382bb commit 54147a9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/src/main/java/net/littlecoder/core/GameHandler.java
Expand Up @@ -21,7 +21,7 @@ class GameHandler implements Keyboard.Listener, ImmediateLayer.Renderer {

private boolean shooting = false;

private byte lifes = 0;
private byte lives = 0;
private int score = 0;
private int level = 0;

Expand Down Expand Up @@ -60,7 +60,7 @@ public void render(Surface surface) {
bulletManager.paint(surface);
asteroidManager.paint(surface);

for (int l = 0; l < lifes; l++)
for (int l = 0; l < lives; l++)
shipPolyline.transform(0f, 20f + l * 20f, 20f).paint(surface);

} else
Expand Down Expand Up @@ -126,7 +126,7 @@ private void detectCollisions() {

if (asteroidManager.isCollidingWith(ship)) {
ship.die();
lifes--;
lives--;
}
}

Expand Down Expand Up @@ -212,7 +212,7 @@ private void initTexts() {
private void initLevel(int level) {
this.level = level;
if (level == 1) {
lifes = 3;
lives = 3;
score = 0;
}

Expand All @@ -231,6 +231,6 @@ private void advanceLevel(float delta) {
}

private boolean isGameOver() {
return level == 0 || lifes == 0 && ship.isDead();
return level == 0 || lives == 0 && ship.isDead();
}
}

0 comments on commit 54147a9

Please sign in to comment.