Is this an algorithm that is backed by geometry theory, and, which if I may ask?
privatevoid update() {
if (x > gameView.getWidth() - width - xSpeed) {
xSpeed = -5;
}
if (x + xSpeed < 0) {
xSpeed = 5;
}
x = x + xSpeed;
currentFrame = ++currentFrame % BMP_COLUMNS;
http://www.edu4java.com/en/androidgame/androidgame4.html
privatevoid update() {
if (x > gameView.getWidth() - width - xSpeed) {
xSpeed = -5;
}
if (x + xSpeed < 0) {
xSpeed = 5;
}
x = x + xSpeed;
currentFrame = ++currentFrame % BMP_COLUMNS;
http://www.edu4java.com/en/androidgame/androidgame4.html