X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=include%2Fgame.php;h=79cdfa6fef32aa623ba5fa13399250a5f65255dc;hp=6b6d6ba82a26e1a6835dc45b2271160ac0ffd593;hb=f11c2bcac54384c4154324e4c72a2b62af35995c;hpb=95231cf6650d277fc13f5c0e1c1a0e1bb9c30edb diff --git a/include/game.php b/include/game.php index 6b6d6ba..79cdfa6 100644 --- a/include/game.php +++ b/include/game.php @@ -1,5 +1,5 @@ +/* Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012 Arun Persaud * * This file is part of e-DoKo. * @@ -537,7 +537,7 @@ switch($mystatus) * ask if player wants to join the game * ****************************************/ - /* don't ask if user has autosetup set to yest */ + /* don't ask if user has autosetup set to yes */ $skip = 0; if($PREF['autosetup']=='yes') $skip = 1; @@ -1681,6 +1681,7 @@ switch($mystatus) /* who is the next player? */ $next = $winner; + $firstcard = ''; /* unset firstcard, so followsuit doesn't trigger with the last trick */ } else { @@ -2070,7 +2071,8 @@ switch($mystatus) echo "\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; }