added a check if the player won the trick, if so, show radiobuttons next to cards to select new one.
Also needed to unset firstcard when winning the trick, since without it follow suite was still working with regards to the first card in the last trick.
/* who is the next player? */
$next = $winner;
+ $firstcard = ''; /* unset firstcard, so followsuit doesn't trigger with the last trick */
}
else
{
echo "</div>\n"; /* end ul tricks*/
- if($myturn && !myisset('card') && $mystatus=='play' )
+ if( ($myturn && !myisset('card') && $mystatus=='play') /* it's my turn*/
+ || ($myturn && myisset('card') && $next==$mypos && $mystatus=='play') /* a card has been played and player won the trick*/)
{
$card_status = CARDS_MYTURN;
}