diff options
author | Arun Persaud <arun@nubati.net> | 2012-02-19 23:31:09 -0800 |
---|---|---|
committer | Arun Persaud <apersaud@lbl.gov> | 2012-02-19 23:31:09 -0800 |
commit | 2fb259fc72129bcb9d209368a97c99638ef77001 (patch) | |
tree | e0767ae8310bc31ddcdbecc501bce3b72b37c1c0 /include | |
parent | 72842383a6162e43f8b9630bfcca13d10eca7bff (diff) | |
download | e-DoKo-2fb259fc72129bcb9d209368a97c99638ef77001.tar.gz e-DoKo-2fb259fc72129bcb9d209368a97c99638ef77001.tar.bz2 e-DoKo-2fb259fc72129bcb9d209368a97c99638ef77001.zip |
BUGFIX: if you win a trick, you don't have to reload the page from now on.
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/game.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/game.php b/include/game.php index 0ce72e5..278a52c 100644 --- a/include/game.php +++ b/include/game.php @@ -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 "</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; } |