I am trying to create my first app and of course I can't even figure out how to structure my domain model properly. The app I am trying to create will show users payout percentages and their paytables for popular video poker and video keno games.
Games are classified by their variant, type (single or multi), and each variant has multiple games; e.g Classic Game King and Ultimate X are variants, and both have the Bonus Poker game. I started my domain model as follows:
Now each game has different payout percentages based on paytables. However, this differs depending on the variant. For example, Bonus Poker(game_name) on Classic game King(variant_name) with a paytable of "250/50/80/40/25/7/5/4/3/2/1" has a payout percentage of 98.01%. The same game and paytable on the Ultimate 4 of a Kind variant has a payout percentage of 99.96%. What would the most efficient way of setting up the Domain Model Be? Seperate Paytable entities for each game and variant? If I were to sort the data out on an excel spreadsheet, there would be over 2000 rows on just poker games alone. I feel like the answer is simple, and I'm just not getting it.
EDIT:
This is what I came up with when I imported an XML with my data. I can't wrap my head around how to display what I want, or if it is even possible the way I have this setup. Here is a sample of the XML.
<?xml version="1.0" encoding="UTF-8"?>
-<Poker>
-<game type="single" name="Classic Game King">
-<variation name="Bonus Poker"><payout short="6/5" payback="96.88%" paytable="250/50/80/40/25/6/5/4/3/2/1"/><payout short="7/5" payback="98.01%" paytable="250/50/80/40/25/7/5/4/3/2/1"/><payout short="8/5" payback="99.17%" paytable="250/50/80/40/25/8/5/4/3/2/1"/></variation>
-<variation name="Bonus Poker Deluxe"><payout short="6/5" payback="95.37%" paytable="250/50/80/6/5/4/3/1/1"/><payout short="7/5" payback="96.26%" paytable="250/50/80/7/5/4/3/1/1"/><payout short="8/5" payback="97.40%" paytable="250/50/80/8/5/4/3/1/1"/><payout short="8/6" payback="98.50%" paytable="250/50/80/8/6/4/3/1/1"/><payout short="9/6" payback="99.64%" paytable="250/50/80/9/6/4/3/1/1"/></variation>
-<variation name="Double Double Bonus Poker"><payout short="6/5" payback="94.66%" paytable="250/50/400/160/160/80/50/6/5/4/3/1/1"/><payout short="7/5" payback="95.70%" paytable="250/50/400/160/160/80/50/7/5/4/3/1/1"/><payout short="8/5" payback="96.80%" paytable="250/50/400/160/160/80/50/8/5/4/3/1/1"/><payout short="9/5" payback="97.88%" paytable="250/50/400/160/160/80/50/9/5/4/3/1/1"/><payout short="9/6" payback="98.99%" paytable="250/50/400/160/160/80/50/9/6/4/3/1/1"/><payout short="10/6" payback="100.08%" paytable="250/50/400/160/160/80/50/10/6/4/3/1/1"/></variation></game>
-<game type="single" name="Ultimate X Poker">
-<variation name="Bonus Poker"><payout short="6/5" payback="96.94%" paytable="250/50/80/40/25/6/5/4/3/2/1"/><payout short="7/5" payback="98.09%" paytable="250/50/80/40/25/7/5/4/3/2/1"/><payout short="8/5" payback="99.21%" paytable="250/50/80/40/25/8/5/4/3/2/1"/></variation>
-<variation name="Bonus Poker Deluxe"><payout short="6/5" payback="95.41%" paytable="250/50/80/6/5/4/3/1/1"/><payout short="7/5" payback="96.33%" paytable="250/50/80/7/5/4/3/1/1"/><payout short="8/5" payback="97.47%" paytable="250/50/80/8/5/4/3/1/1"/><payout short="8/6" payback="98.82%" paytable="250/50/80/8/6/4/3/1/1"/><payout short="9/6" payback="99.96%" paytable="250/50/80/9/6/4/3/1/1"/></variation>
-<variation name="Double Double Bonus Poker"><payout short="7/5" payback="95.80%" paytable="250/50/400/160/160/80/50/7/5/4/3/1/1"/><payout short="8/5" payback="96.80%" paytable="250/50/400/160/160/80/50/8/5/4/3/1/1"/><payout short="9/5" payback="97.93%" paytable="250/50/400/160/160/80/50/9/5/4/3/1/1"/><payout short="9/6" payback="99.05%" paytable="250/50/400/160/160/80/50/9/6/4/3/1/1"/></variation></game>
-<game type="multi" name="Triple Play Draw Poker">
-<variation name="Bonus Poker"><payout short="6/5" payback="96.88%" paytable="250/50/80/40/25/6/5/4/3/2/1"/><payout short="7/5" payback="98.01%" paytable="250/50/80/40/25/7/5/4/3/2/1"/><payout short="8/5" payback="99.17%" paytable="250/50/80/40/25/8/5/4/3/2/1"/></variation>
-<variation name="Bonus Poker Deluxe"><payout short="6/5" payback="95.37%" paytable="250/50/80/6/5/4/3/1/1"/><payout short="7/5" payback="96.26%" paytable="250/50/80/7/5/4/3/1/1"/><payout short="8/5" payback="97.40%" paytable="250/50/80/8/5/4/3/1/1"/><payout short="8/6" payback="98.50%" paytable="250/50/80/8/6/4/3/1/1"/><payout short="9/6" payback="99.64%" paytable="250/50/80/9/6/4/3/1/1"/></variation>
-<variation name="Double Double Bonus Poker"><payout short="6/5" payback="94.66%" paytable="250/50/400/160/160/80/50/6/5/4/3/1/1"/><payout short="7/5" payback="95.70%" paytable="250/50/400/160/160/80/50/7/5/4/3/1/1"/><payout short="8/5" payback="96.80%" paytable="250/50/400/160/160/80/50/8/5/4/3/1/1"/><payout short="9/5" payback="97.88%" paytable="250/50/400/160/160/80/50/9/5/4/3/1/1"/><payout short="9/6" payback="98.99%" paytable="250/50/400/160/160/80/50/9/6/4/3/1/1"/><payout short="10/6" payback="100.08%" paytable="250/50/400/160/160/80/50/10/6/4/3/1/1"/></variation></game>
As you can see, Games can have the same variations. Variations can have the the same or different paytables depending on the game. When importing the XML, It creates duplicates of variations and paytables, because they exist more than once. How can I associate a specific variant and paytable to a game?