Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#71 Patch for Feature:Random Nations - ID: 2414218

closed-out-of-date
nobody
None
5
2011-02-24
2009-11-17
Bridget Hogan
No

Randomizes the European AI nationality order. The randomization occurs on the entire vacant nation list prior to creating a sublist of size equal to the number of available players. This allows for 1 European AI games to be played against any of the remaining Europeans.

This patch changes the vacant nations list stored in Game. If this change is undesirable, the list could be deep copied before shuffling.

Link to feature request:
https://sourceforge.net/tracker/?func=detail&aid=2414218&group_id=43225&atid=435581

Discussion

1 2 > >> (Page 1 of 2)
  • Bridget Hogan
    Bridget Hogan
    2009-11-17

    Copies the vacant list before shuffling

     
  • Bridget Hogan
    Bridget Hogan
    2009-11-17

    Changes the ordering of the vacant list

     
    Attachments
  • Bridget Hogan
    Bridget Hogan
    2009-11-17

    Instead of deep copying, a new List could be made with the same elements.

     
  • Michael Vehrs
    Michael Vehrs
    2009-11-17

    I'm sorry, but this patch does not apply cleanly. The patch claims to be against version 5963, but I can't find the context manually either. It looks more like 4785, actually.

     
  • Michael Vehrs
    Michael Vehrs
    2009-11-20

    Okay. I'll willing to commit to 0.8.x, but you know we are not going to do any more releases from that branch, right?

     
  • Bridget Hogan
    Bridget Hogan
    2009-11-20

    Ok. Here's a patch for 0.9.x. Do you want one also for the trunk?

     
  • Bridget Hogan
    Bridget Hogan
    2009-11-20

    Changes the ordering of the AI nations during startGame() for branch 0.9.x

     
  • Michael Vehrs
    Michael Vehrs
    2009-11-21

    Your patch doesn't actually do very much. You take an entry set, which is already pretty randomly ordered, and shuffle it around a bit. But the nations added to the game are the ones that have the nation state "available" or "AI only", which means exactly the same nations with or without your patch. You need to shuffle the nations earlier, in the PlayersTableModel, for example.

     
  • Michael Vehrs
    Michael Vehrs
    2009-11-21

    Oh, and sorry about the misleading documentation on our website. It is sadly out of date.

     
1 2 > >> (Page 1 of 2)