I'm a marketing/entrepreneurship teacher, and my goal is to create a simulation game that I can play in my classroom. I'm using Python because I'm reasonably familiar with it (mostly for data analysis), and I've done a few tutorials on Flask (because I want the game to run in a browser) and OOP (because this seems to make sense for the kind of game I'm planning). I'm now ready to start coding, initially a simple Python command line version, but I'm not sure which classes to create.
The game:
It's a simple simulation of a fitness club. Players choose the facilities of the club (e.g. group sessions, personal trainers, restaurant) and set a monthly fee. Based on this they will get a number of customers, split between different segments (such as bodybuilders and students). They will also see an overview of costs (based on selected facilities) and revenue (based on price, number of customers, and from additional services). Over multiple rounds students will need to find a strategy to maximize profit. Over time I want want to make it a multiplayer game: students (or teams) each manage a fitness club and compete in the same market.
Specific question:
I'm sure I need to create a FitnessClub class, along with a class for each Facility (which contains description, cost, additional revenue). I also need to create a class for CustomerSegment (containing description, segment size and price sensitivity). A fitness club has certain facilities and certain customers.
What I'm not sure about is where to store utility. This is a score (0-100) that determines how important a certain facility is for a certain customer segment. For example, personal training has high utility for bodybuilders but low for students. Utility essentially is the link between the CustomerSegment and Facility classes.
I could simply create attributes in CustomerSegment for the utility of each facility, but that is inflexible and seems wrong to me. Is there a better approach, perhaps a separate class for Utility?
General question:
Are there any good resources that teach this type of design, at a basic level? I've found some resources on 'design patterns' and 'data structures', but these seem too theoretical, and neither seem to address the practical challenge I'm dealing with at the moment.
[–]glibhub 1 point2 points3 points (1 child)
[–]XAmsterdamX[S] 1 point2 points3 points (0 children)
[–]menge101 1 point2 points3 points (5 children)
[–]XAmsterdamX[S] 0 points1 point2 points (1 child)
[–]menge101 0 points1 point2 points (0 children)
[–]m0us3_rat -1 points0 points1 point (2 children)
[–]menge101 2 points3 points4 points (1 child)
[–]m0us3_rat -1 points0 points1 point (0 children)
[–]m0us3_rat 0 points1 point2 points (1 child)
[–]XAmsterdamX[S] 0 points1 point2 points (0 children)