title: Android game java boolean solution
body: <p>What I'm trying to do is, making a game object move slower when a certain score is reached. I'm trying to do so with the help of boolean.</p>
  
  <p>There´s the score.</p>
  
  <pre><code>public boolean bol = false;
  </code></pre>
  
  <p>And there´s my bool.</p>
  
  <pre><code>if(score == 2) {
          bol = true;
  }
  </code></pre>
  
  <p>Here´s the statement.</p>
  
  <pre><code>if(gw.bol = true) {
          acceleration = new Vector2(0, 200);
  }
  </code></pre>
  
  <p>And if bol is true (which it will be when the user reaches the score 2?) then should the acceleration became that new one I wrote? </p>
  
  <p>But when I run the code I get:</p>
  
  <pre><code>Exception in thread "LWJGL Application" java.lang.NullPointerException
  at com.kilobolt.GameObjects.Bird.&lt;init&gt;(Bird.java:31)
  at com.kilobolt.GameWorld.GameWorld.&lt;init&gt;(GameWorld.java:32)
  at com.kilobolt.Screens.GameScreen.&lt;init&gt;(GameScreen.java:25)
  at com.kilobolt.ZombieBird.ZBGame.create(ZBGame.java:13)
  at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:136)
  at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:114)
  </code></pre>