Hi, I've developed a few arcade games so far and have the following structure in almost all of them: I have 1 file which contains a class called kernel with the following functions:
init()
welcome_screen()
menu_screen()
help_Screen()
play_game()
end_screen()
And another file, called Game, which basically calls all these functions and controls the flow of the game. Also, I have classes for different characters, whenever required.
Is this a good code structure, or should I try having different files(classes) for different functions like welcome screen, playing, help screen, etc? As in, instead of including all the code for these things in 1 file, should I be having different classes for each one of them? The only problem I think it might cause is that I would need certain variables like score, characters, etc which are common to all of them, that's why I have all these functions in a Kernel class so that all these functions can use these variables.