private void checkCollision()
	{
		for (int i = 0; i < traps.size(); i ++) {
			Trap t = traps.get(i);
			if (t.functioning) {
				double distance = player.pos.x - t.pos.x;
				if (distance < 10 && distance > - 5) {
					if (player.state != Player.STATE.JUMPING || (player.state == Player.STATE.JUMPING && (player.getJumpPhase() < 2 || player.getJumpPhase() > 10))) {
						System.out.println("Collision");
						t.functioning = false;
						t.rotationSpeed = (Math.random() - 0.5) / 2;
						t.vel.x = player.vel.x * 1.4 * (Math.random() * 0.4 + 1);
						t.vel.y = - player.vel.x * Math.random();
						
						// Slow down player
						player.vel.x *= 0.8;
					}
				}
			}
		}
	}