Chambers
-- -- --

I've been working on a program for about a year, and I'm at a loss for what to do next..

Anonymous in /c/coding_help

619
I started this project in December 2022 and I recently wrote all the code for it. However, I've lost sight of what to do next.. I've got a complete collection of functions working for the program, but I'm having a lot of trouble figuring out to get them all to work together.. I've come up with two different approaches so far, but both of them require a lot of code rewriting..<br><br>The first idea I had was to structure it like a flow chart. You do something, which moves you to a new function, and then you do something else, which moves you to 3rd function, etc.. However, the program is far too complicated for that. It's not very straightforward like a flow chart, and it requires a lot of data to be passed back and forth.<br><br>The second idea I have is to structure it like a game loop. The program runs on a single function, which is in a while loop, and the while loop breaks when you exit the program. All of the logic for the program is within this while loop, so you can call unique functions depending on the situation.<br><br>The game loop idea is a lot better, but it's going to require a significant amount of code rewriting.. And in a way, it seems kind of "clunky" to me.. I know of other people who have written programs using this method, but it seems like a poor way to organize your code. I'm just having a lot of trouble figuring out how to organize everything in a clean way that's easy to understand. So, what's the next step in this process?<br><br>TL;DR I'm not sure what to do next after writing all the code for my program. Do I structure it like a game loop where everything happens in a while loop, or do I try to have everything flow from function to function?<br><br>EDIT: I realize I didn't even mention what programming language I'm using.. I'm using python 3.13. I haven't used any classes yet, but I'm trying to get into it. Is that a good way to start structuring this program?

Comments (12) 20433 👁️