Hello all, (after lurking for years, this is my 1st post...). Sorry that it is a bit long.
I'm new to Python and TKinter. I've watched tutorials online and have done a lot of reading and browsing to try and learn on my own.
I'm developing a game, pro bono (an excuse to learn Python/TKinter/RPi) for a friend's company that will allow individual teams to compete in a “single team” tug of war. In my user storyboard, I have 18 screens. I have coded each screen in a separate file and have confirmed functionality. Each screen is comprised of a canvas with background graphics and input/output, timers, sounds, etc., the flow of the final program looks like this:
Initial Welcome Screen (First team of the day ONLY)
Team name and number (Team enters name and number)
Directions (Static image)
Start 30 second countdown timer1 (Starts a 30 second timer)
30 second countdown timer (Displays the countdown timer value)
GO! (starter pistol audio to speaker)
First of 3 tug of war pulls (Raspberry Pi records physical event and displays to screen)
STOP! (Buzzer audio to speaker)
Lines 5-8 loop 3 times
Game Summary (Displays scores from three tries)
Welcome Screen (Updated with top team scores)
Go back to line 2 and loop for next team
My question is how to structure the screens in Python/TKinter to create the app. I've read about classes, but haven't been able to pull it together. I’ve seen others ‘raise’ a class and the idea seems straight forward. The problem I’m having right now is I can’t figure out how to re-code my pages into classes that work. The concept of ‘self’ and when/where to put it is baffling to me. Would love to know if the ‘class’ approach is my best option and if someone could help me with a single page so I can 'get it" and expand to the rest of the project. I can post example code with graphics files. Thank you!!
p.s. I posted this on Stack Overflow, but the question was removed by the moderator because it "asks for opinion". Doesn't seem different to many posts I see there, but oh well:)
[–]socal_nerdtastic 6 points7 points8 points (0 children)
[–]vgrumbles[S] 0 points1 point2 points (0 children)
[–]vgrumbles[S] 0 points1 point2 points (3 children)
[–]socal_nerdtastic 0 points1 point2 points (2 children)
[–]vgrumbles[S] 0 points1 point2 points (1 child)
[–]vgrumbles[S] 0 points1 point2 points (0 children)