Ok, Albert contains a Ball member.
Does the main game contain a ball too, or is it directly accessing Albert's ball?
If the game has a ball, then the issue is that the game's ball is the one that's updating and Albert's ball isn't updated. There's two balls, one is moving and rendering and the other (not rendered or updated) is the one Albert is watching.
The easiest way to handle that case would be to change Albert's ball to a ball pointer:
Ball *ball;
Then get the game to set that pointer to the address of the game's ball.
//Something like:
albert.ball = &mainBall;
You'll also need to change all of Albert's code that accesses the ball from ball. to ball-> as it's now a pointer.
Here's an example of what I mean (not working code, just an outline):
// Ball.h
class Ball
{
// Stuff
};
// Albert.h
class Albert
{
// Stuff
Ball *ball;
public:
void setBall(Ball *b) { ball = b; }
};
//main.cpp
#include "Ball.h"
#include "Albert.h"
int main()
{
Ball mainBall;
Albert albert;
albert.setBall(&mainBall);
// Do all the game stuff
return 0;
}