Well, I didn't see (or realize) you were implementing 2 views. Anyway, as the RenderWindow object (app) is the same, independently of what function it is passed to, I think it would be better to pass it as a parameter in the constructor (the function that creates the object - I don't know exactly how it is in C++). That's because you just pass that var (app, bird, etc) ONCE, and then you can simply access it from anywhere in the class without extra parameter adding in every internal class function. But ... you don't call a var ... you call a function ... you pass the var as a parameter (in this case)
class Obstacle
{
private int x, y;
private Bird bird;
private RenderWindow app;
// other variables
// pass the Bird and RenderWindow references so you can use them directly in the class
public Obstacle(int x, int y, Bird bird, RenderWindow app)
{
this.x = x; this.y = y;
this.bird = bird; // assign the Bird reference to a class var through you can access that object
this.app = app; // the same for the RenderWindow
// other assignments
}
public void Draw() // here you don't need to pass the bird, app, etc, as a parameter
{
if (Collision(this, this.bird) { // this.bird contains the Bird object reference
// do something ;
// other stuff
this.app.Draw(obstacleTexture); // this.app contains the RenderWindow object reference
}
}
}
Regarding to the program model, I think that even the smallest ones would be more easier to make (read, understand, ...) if you try to organize it acording to the common practices ... it would be easier to develop for you, and easier to read and understand to other people
I'll try to see the entire code to give my view better