Working with tables - "Generate Fixtures"

I am currently working on a game which is Football-Manager-ish in nature. Where users will have to get through one season after another. It is nothing fancy, just a simple game that uses lots of tables. Right now I am a bit stuck on how to generate random fixtures whenever a uses finishes one season and wants to start another one. I have already set up the fixtures for season 1, and I could use the same fixtures again for the next seasons, but it would appear boring for the uses.

I need help in generating new fixtures for new seasons. Let me explain how the table works. The row consists of the number of matchday, 14 as the game only has 8 teams playing each other twice home and away. The column consists of the ID number for the teams playing during corresponding matchday, where the odd column (1,3,5,7) represents the home teams, and the even column (2,4,6,8) represents the away teams.

I have attached the picture of the "default" fixtures table that I have set up below. I need to generate a new fixture table every new season, where the ID 7 (which is the ID of the user's club), would appear to in the odd column for matchday 1, and then in the even column for matchdy 2, and so on. Plus, every IDs only play each other twice, home and away.

I know it is a loooong question to ask, but if anyone has any idea on how, or know is it possible to do this thing, please help me.

Comments

  • pokapolapokapola Member Posts: 143

    Forgot to add,

    Matchday X :

    IDTeamColumn1 VS IDTeamColumn2
    IDTeamColumn3 VS IDTeamColumn4
    IDTeamColumn5 VS IDTeamColumn6
    IDTeamColumn7 VS IDTeamColumn8

  • pokapolapokapola Member Posts: 143

    I have finally found a solution, which is much simpler than to generate a whole new table, LOL.

  • DocJDocJ Member Posts: 66

    @pokapola , I'm currently trying to build a game with 6 dice. I was looking for a way to take the total score from the 6 dice, post it on the scorecard, and start another round. Your problem using the same table for the next season, sounds along the lines of what I'm trying to accomplish. Can you please tell me how you solved your problem? Thank you for any guidance.
    Doc

  • pokapolapokapola Member Posts: 143

    Why not generate random number from 1 to 6 for each dices.

    Then you total up the random number :
    for example TotalScore=Dice1+Dice2+..+Dice6.

    I think there's no need to use tables.

Sign In or Register to comment.