Re: Puerto Rico seat position... something really ridiculous is going on.
Posted: 28 February 2020, 08:51
Thanks for computing the odds 
Here is the actual PHP code that is randomizing the players:
Notes:
_ $bOrderPlayerRandomly is set to "false" in case of a rematch, to perform a "players rotation" (already explained in other threads).
_ Why we are using the "shuffle" function is explained here: https://boardgamearena.com/faq?anchor=f ... ing_random . Basically, it is based on on Mersenne Twister algorithm, which is used by most Poker websites to randomize the card decks.
At the end, this discussion makes me think of this part of the (great) conference given at Google's headquarter by Eric Hautemont (former Days of Wonder CEO) about the players who could never believe that the dice rolled by the AI of Memoir 44' was fair. The best is to watch his exact words here:
https://youtu.be/LFj8Gw4maXg?t=1144
Hope this helps.
Here is the actual PHP code that is randomizing the players:
Code: Select all
if( $bOrderPlayerRandomly )
{
// Shuffling player order (preserving keys)
$keys = array_keys($players);
$new_players = array();
shuffle($keys);
foreach($keys as $key) {
$new_players[$key] = $players[$key];
}
$players = $new_players;
}
_ $bOrderPlayerRandomly is set to "false" in case of a rematch, to perform a "players rotation" (already explained in other threads).
_ Why we are using the "shuffle" function is explained here: https://boardgamearena.com/faq?anchor=f ... ing_random . Basically, it is based on on Mersenne Twister algorithm, which is used by most Poker websites to randomize the card decks.
At the end, this discussion makes me think of this part of the (great) conference given at Google's headquarter by Eric Hautemont (former Days of Wonder CEO) about the players who could never believe that the dice rolled by the AI of Memoir 44' was fair. The best is to watch his exact words here:
https://youtu.be/LFj8Gw4maXg?t=1144
Hope this helps.