Yeah, this may seem a bit weird and complex as I'm going far into the concepts of OOP, but here me out. I have 3 objects: a GameBoard Object, a Card Object, and an Effect Object.
GameBoard has-a Card, and Card has-a Effect.
If I wanted Effect to provide instructions for GameBoard to modify its descendants, how would I do so? I was wondering if I could simply have a high order class like GameBoard read a function in from Effect, but I'd assume the variables of that function and all of its effects wouldn't be understood as they don't exist within Effect. Maybe even loadstring()()? I've been pondering this for months now and I wonder how I should revise my thinking.

2 comments
Counldn't you invoke the card to invoke the effect? ie: Have the gameboard call a function of Card that calls a function of effect and returns data back to GameBoard
Yes but what data am I to return? Functions of gameboard that are not visible to effect?