public void setSpeedX(int x)
{
if (x != 0)
{
this.deltaX = x;
}
// Instead of setting the X speed to 0, set it to the slowest it can go: 1 (or -1)
else {
this.deltaX = this.deltaX / this.deltaX;
}
}
The adjustment for 1/-1 always sets 1 instead of -1 (if the previous speed is negative).
2 has a bug in ChangingSwimmer:
The adjustment for 1/-1 always sets 1 instead of -1 (if the previous speed is negative).