The following is a simplified example for something I'm trying to do in python (with pygame, but that's probably irrelevant).
I have a list of 8x8 pixel jpgs, each depicting an English letter:
[a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z]
I want to arrange a 4x4 grid of these, in any pattern I want, as a larger 32x32 picture:
gmmg
gppg
gppg
gmmg
But that pattern is only a single frame of an animation. For example, I might want 4 animation frames where b's and n's flash side to side alternately while an f moves southwest:
bbnf nnbb bbnn nnbb
bbnn nnfb bbnn nnbb
bbnn nnbb bfnn nnbb
bbnn nnbb bbnn fnbb
I want control over the letter value of each square in each frame to make any animation, so I guess essentially there are 64 separate variables (for a 4-frame animation like the one shown above). Each square also has an [x,y] list position variable and rbg color.
My question is how to organize this all with classes (I'm trying to learn OOP). Logically, it seems that each frame contains squares, and each square contains variables like position, letter and color. But I suppose you could even think of it as each square 'contains' 4 frames...
My guess is make a frame class, and put 4 instances of it in a list (if there's 4 frames) and somehow make each frame instance contain a list of 16 square instances. Maybe usable like frames[2].squares[5].letter = f (Just a fuzzy idea; I'm too new at OOP to know if that's remotely correct or a good idea). But it would be helpful to see how someone who knows what they're doing would organize all this.
Thanks!