I have a code like this:
class Foo() {
time_to_play = 0
class Bar() {
void change_player() {
}
}
}
And I need to change the attribute time_to_playfrom the class Foo, but make this change from the method change_player()that is under the class Bar.
I cannot declare a class Baroutside the class Fooand make an “extension” and call super .... because it broke OO in my case.
Also, I don't want the static variable to time_to_playcallFoo.time_to_play
How can i do this?
source
share