private void getNextPosition() {
		// movement
		if (left) {
			dy -= moveSpeed;
			if (dy < -maxSpeed) {
				dy = -maxSpeed;
			}
		} else if (right) {
			dy += moveSpeed;
			if (dy > maxSpeed) {
				dy = maxSpeed;
			}
		}
		// falling
		if (falling) {
			dy += fallSpeed;
		}
	}