Code: Select all

```
poo0_x += poo0_v_x;
poo0_y += poo0_v_y;
poo1_x += poo1_v_x;
poo1_y += poo1_v_y;
poo2_x += poo2_v_x;
poo2_y += poo2_v_y;
```

Code: Select all

```
int poo0_temp_x = poo0_x;
int poo0_temp_y = poo0_y;
int poo1_temp_x = poo1_x;
int poo1_temp_y = poo1_y;
int poo2_temp_x = poo2_x;
int poo2_temp_y = poo2_y;
```

Code: Select all

```
poo0_x = Clamp(poo0_x, 25, gfx.ScreenWidth);
poo0_y = Clamp(poo0_y, 25, gfx.ScreenHeight);
poo1_x = Clamp(poo1_x, 25, gfx.ScreenWidth);
poo1_y = Clamp(poo1_y, 25, gfx.ScreenHeight);
poo2_x = Clamp(poo2_x, 25, gfx.ScreenWidth);
poo2_y = Clamp(poo2_y, 25, gfx.ScreenHeight);
```

Code: Select all

```
poo0_v_x = negateBound(poo0_temp_x, poo0_x,poo0_v_x);
poo0_v_y = negateBound(poo0_temp_y, poo0_y,poo0_v_y);
poo1_v_x = negateBound(poo1_temp_x, poo1_x,poo1_v_x);
poo1_v_y = negateBound(poo1_temp_y, poo1_y,poo1_v_y);
poo2_v_x = negateBound(poo2_temp_x, poo2_x,poo2_v_x);
poo2_v_y = negateBound(poo2_temp_y, poo2_y,poo2_v_y);
```

Code: Select all

```
int Game::negateBound(int prev, int current, int vel)
{
if (prev != current)
return -vel;
return vel;
}
```