Page 1 of 1

Fortune cards draw

Posted: 15 December 2020, 13:48
by Imay
Hello, thanks for this game!

I was wondering about the fortune cards draw implementation. It seems that the you pick aleatory a fortune card, while in the rules it seems that you pick the top card of the pile, that would mean that there is a pile of card.

so we souldn't pick 2 identical cards in a row. I t should be implemented as a pile of card that is reshuffled when the pile ends.

It is only a suggestion, but that is how i understand it.

Thanks!
Rgds

Re: Fortune cards draw

Posted: 15 December 2020, 15:19
by VinceS
Hi,

the game comes with a deck of 35 cards. Each of the 11 different fortune cards has 2 - 4 copies. Here is the distribution of the cards directly from the code. The last element "nbr" indicates the number of cards in the deck:
$cards = array();
$cards [] = array ( 'type' => 1 , 'type_arg' => 1, 'nbr' => 4 );
$cards [] = array ( 'type' => 2 , 'type_arg' => 1, 'nbr' => 3 );
$cards [] = array ( 'type' => 3 , 'type_arg' => 1, 'nbr' => 2 );
$cards [] = array ( 'type' => 4 , 'type_arg' => 1, 'nbr' => 4 );
$cards [] = array ( 'type' => 5 , 'type_arg' => 1, 'nbr' => 4 );
$cards [] = array ( 'type' => 6 , 'type_arg' => 1, 'nbr' => 4 );
$cards [] = array ( 'type' => 7 , 'type_arg' => 1, 'nbr' => 4 );
$cards [] = array ( 'type' => 8 , 'type_arg' => 1, 'nbr' => 4 );
$cards [] = array ( 'type' => 9 , 'type_arg' => 1, 'nbr' => 2 );
$cards [] = array ( 'type' => 10 , 'type_arg' => 1, 'nbr' => 2 );
$cards [] = array ( 'type' => 11 , 'type_arg' => 1, 'nbr' => 2 );

When you run out of cards (usually in round 36) the deck is reshuffled.

If you would get a card at least 5 times in a game with less than 35 turns, please report a bug. Otherwise everything is implemented as in the real game.

(The Promocards each have 4 copies if you include them)

Thanks for your feedback anyway and have fun playing.
VinceS

Re: Fortune cards draw

Posted: 15 December 2020, 16:27
by Imay
Oh great, i thought there was only 1 of each.
That is perfect then! thanks a lot ! :)