Commit c73ff932 authored by nargessalehi98's avatar nargessalehi98

Fix getPrize condition bug.

parent 9e6371b0
...@@ -141,16 +141,15 @@ public class GameState { ...@@ -141,16 +141,15 @@ public class GameState {
move(-5); move(-5);
break; break;
} }
}
for(Prize prize:Controller.prizes){
for(Prize prize:Controller.prizes){ if((getBounds(locX, locY).intersects(new Rectangle((int) prize.getX(), (int) prize.getY(), prize.getWidth(), prize.getHeight())))){
if((getBounds(locX, locY).intersects(new Rectangle((int) prize.getX(), (int) prize.getY(), prize.getWidth(), prize.getHeight())))){ Controller.getPrize=true;
Controller.getPrize=true; // System.out.println("get");
} System.out.println(prize.getName());
} }
} }
if (keyLEFT) if (keyLEFT)
rotateAmount -= 15; rotateAmount -= 15;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment